home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / CPMUG / CPMUG088.ARK / EPCHECKS.BAS < prev    next >
BASIC Source File  |  1984-04-29  |  4KB  |  177 lines

  1.      rem This is the Payroll Check Printer
  2.  
  3.  
  4. %INCLUDE ALL.BAS
  5.  
  6.      dim TC%(28),n(2,20),k$(3,20),h(9),s(9),t(4,9)
  7.      print clear$:print
  8.  
  9.     z5$="b:ep":z6$="b:tm":z7$="b:epsize"
  10.  
  11.  
  12.     fmt6$="                                                            "
  13.     fmt6$=fmt6$+"                /...5../"
  14.  
  15.     fmt9$="  ####  ####   ##.##  ####.##  ####.##     -      -   ####.##"
  16.     fmt9$=fmt9$+"    ####.##     ####.##"
  17.  
  18.     fmt12$="                                  SDI       MISC"
  19.  
  20.     fmt13$="                                                           "
  21.     fmt13$=fmt13$+"                 ########"
  22.  
  23.     fmt16$="  ####.##   ####.##   ####.##   ####.##   ####.##          "
  24.     fmt16$=fmt16$+"                  ####.##"
  25.  
  26.     fmt19$=" /...5...10...15...20.../"
  27.  
  28.     fmt20$=" /...5...10/                                                "
  29.     fmt20$=fmt20$+"                 ####.##"
  30.  
  31.     fmt32$="                                           "
  32.     fmt32$=fmt32$+"/...5../   ########      $$#####.##"
  33.  
  34.     fmt33$="        /...5...10...15...20.../"
  35.     fmt34$="        /...5...10...15...20.../"
  36.     fmt35$="        /...5...10...15./, //  /.../"
  37.  
  38.      RESTORE
  39. 1075 N(1,3)=24:N(1,4)=24:N(1,5)=24:N(1,6)=17:N(1,7)=2:N(1,8)=5
  40. 1080 N(1,9)=14:N(1,10)=11:N(1,11)=8:N(1,12)=8:N(1,13)=1:N(1,14)=1:N(1,15)=1
  41.  
  42.     N$=""
  43.  
  44. 8000 PRINT clear$:PRINT
  45. 8050 PRINT "THIS IS THE PAYROLL CHECK PRINTING PROGRAM."
  46. 8060 PRINT
  47. 8070 PRINT "SET PRINTER TO TOP OF FORM ****"
  48. 8080 PRINT
  49. 8100 print "Would you like a ***VOID*** check printed to"
  50.     print "establish print positions ? (Y/N)"
  51.  
  52.     input line temp$
  53.  
  54.     if ucase$(left$(temp$,1))="Y" then GOSUB 10000
  55.     if ucase$(left$(temp$,1))<>"N" then 8000
  56.  
  57.  
  58.     open z7$ as 1
  59.         read #1;z2,z3
  60.         close 1
  61.  
  62. 8240 Z2=z2-1
  63. 8270 PRINT clear$:PRINT
  64. 8290 PRINT "CHECKS TO BE PRINTED = ",Z2
  65. 8300 PRINT
  66. 8310 INPUT "TO PRINT CHECKS, DO CARRIAGE RETURN. ";line temp$
  67.  
  68.     open z5$ recl 512 as 1
  69.     open z6$ recl 128 as 2
  70.  
  71. 8325 lprinter
  72. 8330 FOR Z5=1 TO Z2
  73. 8340 read #1,z5;N(2,1),N(2,2),N$,N,R,H1,H2,H3,\
  74.           E0,E1,E2,F1,F2,F3,E3,E4,E5,E6,E7,E8,S1,S2,S3,M1,M2,M3
  75.  
  76.     read #2,z5;temp1,temp2,o$,temp3,tips,temp4,temp5,\
  77.         ot,dt,st,ht,vt
  78.  
  79. 8390 P4=E0-S1-M1-E3-E6-F1
  80.  
  81. 8395 Z9=1:FOR Z=3 TO 15:K$(3,Z)=MID$(N$,Z9,N(1,Z)):Z9=Z9+N(1,Z):NEXT Z
  82.  
  83.     temp5=temp5+st+ht+vt
  84.  
  85.     if ucase$(k$(3,14))="S" then ot=0:dt=0
  86.  
  87.     if ucase$(k$(3,14))="S" and ucase$(k$(3,15))="W" then temp5=40
  88.     if ucase$(k$(3,14))="S" and ucase$(k$(3,15))="B" then temp5=80
  89.     if ucase$(k$(3,14))="S" and ucase$(k$(3,15))="S" then temp5=86.66667
  90.     if ucase$(k$(3,14))="S" and ucase$(k$(3,15))="M" then temp5=173.33333
  91.  
  92.     if E0=0 then 8720   rem skip checks with zero gross pay
  93.  
  94. 8400 REM *** AND PRINT THE CHECK ***
  95.  
  96.     for z=1 to 5:print:next z
  97.  
  98.     print using fmt6$;d$(2)
  99.  
  100.     print:print
  101.  
  102.     print using fmt9$;temp5,ot+dt,r,temp5*r,(ot*r*1.5)+(dt*r*2),\
  103.         tips,e0-tips,e0
  104.  
  105.     print:print
  106.  
  107.     print fmt12$
  108.  
  109.     print using fmt13$;temp1
  110.  
  111.     print:print
  112.  
  113.     print using fmt16$;f1,e3,e6,s1,m1,s1+f1+e3+e6+m1
  114.  
  115.     print:print
  116.  
  117.     print using fmt19$;o$
  118.     print using fmt20$;k$(3,10),p4
  119.  
  120.     for z=1 to 11:print:next z
  121.  
  122.     print using fmt32$;d$(1),temp1,p4
  123.     print using fmt33$;k$(3,3)
  124.     print using fmt34$;k$(3,5)
  125.     print using fmt35$;k$(3,6),k$(3,7),k$(3,8)
  126.  
  127.     for z=1 to 7:print:next z
  128.  
  129.  
  130. 8720 NEXT Z5
  131. 8730 close 1:close 2
  132. 8740 console
  133. 8750 CHAIN "master5"
  134.  
  135.  
  136. 10000 REM *** AND PRINT A ***VOID*** CHECK ***
  137.  
  138.     lprinter
  139.  
  140.     k$(3,3)="*** VOID ***"
  141.  
  142.     for z=1 to 5:print:next z
  143.  
  144.     print using fmt6$;d$(2)
  145.  
  146.     print:print
  147.  
  148.     print using fmt9$;temp5,ot+dt,r,temp5*r,(ot*r*1.5)+(dt*r*2),\
  149.         tips,e0-tips,e0
  150.  
  151.     print:print
  152.  
  153.     print fmt12$
  154.  
  155.     print using fmt13$;temp1
  156.  
  157.     print:print
  158.  
  159.     print using fmt16$;f1,e3,e6,s1,m1,s1+f1+e3+e6+m1
  160.  
  161.     print:print
  162.  
  163.     print using fmt19$;o$
  164.     print using fmt20$;k$(3,10),p4
  165.  
  166.     for z=1 to 11:print:next z
  167.  
  168.     print using fmt32$;d$(1),temp1,p4
  169.     print using fmt33$;k$(3,3)
  170.     print using fmt34$;k$(3,5)
  171.     print using fmt35$;k$(3,6),k$(3,7),k$(3,8)
  172.  
  173.     for z=1 to 7:print:next z
  174.  
  175.     console
  176.     RETURN
  177.