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 / EPJOPOST.BAS < prev    next >
BASIC Source File  |  1984-04-29  |  6KB  |  155 lines

  1.      rem This is the Payroll Journal Posting Program
  2.  
  3. %INCLUDE ALL.BAS
  4.      dim n(2,20)
  5.      L$="$#,###,###.##"
  6.      RESTORE
  7. 1040 PRINT clear$
  8. 1050 PRINT 
  9. 1060 PRINT  "THIS IS THE PAYROLL REGISTER POSTING PROGRAM."
  10. 1070 PRINT 
  11.      print "Be sure the employee payroll disk is installed in drive B"
  12.      PRINT:INPUT "Then type return to continue.";LINE temp$
  13.      INITIALIZE
  14. 1145 Z9=0
  15. 1500 open "b:epsize" as 1
  16.     read #1;z2,z3,flag
  17.     close 1
  18.      z2=z2-1
  19. 1600 PRINT clear$:PRINT
  20. 2000 PRINT  "RECORDS TO BE POSTED = ",Z2
  21. 2010 PRINT 
  22. 2015 INPUT "TO DO POSTING, TYPE CARRIAGE RETURN. ";line temp$
  23. 2220 open "b:ep" recl 512 as 1
  24. 2230 FOR Z=1 TO Z2
  25. 2240 read #1,z;N(2,1),N(2,2),N$,N,R,H1,H2,H3,\
  26.      E0,E1,E2,F1,F2,F3,E3,E4,E5,E6,E7,E8,S1,S2,S3,M1,M2,M3
  27. 2260 H2=H2+H1:H3=H3+H1:S2=S2+S1:S3=S3+S1:M2=M2+M1:M3=M3+M1
  28. 2270 E1=E1+E0:E2=E2+E0:E4=E4+E3:E5=E5+E3:E7=E7+E6:E8=E8+E6
  29. 2280 F2=F2+F1:F3=F3+F1
  30. 2290 S4=S4+S1:M4=M4+M1:T0=T0+E0:T3=T3+E3:T6=T6+E6:F4=F4+F1
  31. 2300 H1=0:S1=0:M1=0:E0=0:E3=0:E6=0:F1=0
  32. 2310 print #1,z;N(2,1),N(2,2),N$,N,R,H1,H2,H3,\
  33.      E0,E1,E2,F1,F2,F3,E3,E4,E5,E6,E7,E8,S1,S2,S3,M1,M2,M3
  34. 2330 NEXT Z
  35. 2340 close 1
  36. 2350 P4=T0-S4-M4-T3-T6-F4
  37. 2360 PRINT clear$
  38. 2370 PRINT "INSTALL GENERAL LEDGER (GL) DISK IN DRIVE B."
  39. 2380 PRINT 
  40. 2390 INPUT "THEN TYPE CARRIAGE RETURN TO CONTINUE. ";line temp$
  41.      initialize
  42. 3010 PRINT clear$:print
  43. 3030 open "b:gl" recl 138 as 1
  44. 3040 INPUT "ENTER NET SALARIES ACCOUNT RECORD # - ";Z
  45. 3050 read #1,z; N(2,1),N(2,2),G$,G1,G2,G3,G4,G5,G6,G7
  46. 3060 PRINT 
  47. 3070 PRINT "IS ";N(2,2);" ";G$;" THE CORRECT ACCOUNT?"
  48. 3080 PRINT :INPUT "(Y OR N) ";line temp$
  49. 3090 if left$(temp$,1)="n" or left$(temp$,1)="N" then 3040
  50. 3500 if left$(temp$,1)<>"y" and left$(temp$,1)<>"Y" then 3060
  51. 3510 G1=G1+P4:G2=G2+P4:G3=G3+P4
  52. 3520 print #1,z; n(2,1),n(2,2),g$,g1,g2,g3,g4,g5,g6,g7
  53.      LPRINTER
  54.  
  55.     for z=1 to 72:delim$=delim$+"*":delim1$=delim1$+"=":next z
  56.         print delim$:print
  57.     print "Payroll posting to General Ledger for period ending ";d$(2)
  58.         print:print delim1$:print
  59.  
  60. 3530 print 
  61. 3540 print "(X)";tab(5);"TOTAL NET SALARIES POSTED";tab(62);
  62.      print using l$;P4
  63.      CONSOLE
  64. 3550 PRINT 
  65. 3560 INPUT "ENTER STATE DISABILITY INS PAYABLE ACCOUNT RECORD # - ";Z
  66. 3570 read #1,z; N(2,1),N(2,2),G$,G1,G2,G3,G4,G5,G6,G7
  67. 3580 PRINT 
  68. 3590 PRINT "IS ";N(2,2);" ";G$;" THE CORRECT ACCOUNT?"
  69. 3600 PRINT :INPUT "(Y OR N) ";line temp$
  70. 3610 if left$(temp$,1)="n" or left$(temp$,1)="N" then 3560
  71. 3620 if left$(temp$,1)<>"y" and left$(temp$,1)<>"Y" then 3580
  72. 3630 G1=G1+S4:G2=G2+S4:G3=G3+S4
  73. 3640 print #1,z; n(2,1),n(2,2),g$,g1,g2,g3,g4,g5,g6,g7
  74.      LPRINTER
  75. 3650 print 
  76. 3660 print "(X)";tab(5);"TOTAL STATE DIS INS PAYABLE POSTED";tab(62);
  77.      print using l$;s4
  78.      CONSOLE
  79. 3670 PRINT 
  80. 3680 INPUT "ENTER MISC DEDUCTIONS PAYABLE ACCOUNT RECORD # - ";Z
  81. 3690 read #1,z; N(2,1),N(2,2),G$,G1,G2,G3,G4,G5,G6,G7
  82. 3700 PRINT 
  83. 3710 PRINT "IS ";N(2,2);" ";G$;" THE CORRECT ACCOUNT?"
  84. 3720 PRINT :INPUT "(Y OR N) ";line temp$
  85. 3730 if left$(temp$,1)="n" or left$(temp$,1)="N" then 3680
  86. 3740 if left$(temp$,1)<>"y" and left$(temp$,1)<>"Y" then 3700
  87. 3750 G1=G1+M4:G2=G2+M4:G3=G3+M4
  88. 3760 print #1,z; n(2,1),n(2,2),g$,g1,g2,g3,g4,g5,g6,g7
  89.      LPRINTER
  90. 3770 print 
  91. 3780 print "(X)";tab(5);"TOTAL MISC DED PAYABLE POSTED";tab(62);
  92.      print using l$;m4
  93.      CONSOLE
  94. 3790 PRINT 
  95. 3800 INPUT "ENTER FICA PAYABLE ACCOUNT RECORD # - ";Z
  96. 3810 read #1,z; N(2,1),N(2,2),G$,G1,G2,G3,G4,G5,G6,G7
  97. 3820 PRINT 
  98. 3830 PRINT "IS ";N(2,2);" ";G$;" THE CORRECT ACCOUNT?"
  99. 3840 PRINT :INPUT "(Y OR N) ";line temp$
  100. 3850 if left$(temp$,1)="n" or left$(temp$,1)="N" then 3800
  101. 3860 if left$(temp$,1)<>"y" and left$(temp$,1)<>"Y" then 3820
  102. 3870 G1=G1+(F4*2):G2=G2+(F4*2):G3=G3+(F4*2)
  103. 3880 print #1,z; n(2,1),n(2,2),g$,g1,g2,g3,g4,g5,g6,g7
  104.      LPRINTER
  105. 3890 print 
  106. 3900 print "(X)";tab(5);"TOTAL FICA PAYABLE POSTED";tab(62);
  107.      print using l$;f4*2
  108.      CONSOLE
  109. 3910 PRINT 
  110. 3920 INPUT "ENTER FEDERAL TAX PAYABLE ACCOUNT RECORD # - ";Z
  111. 3930 read #1,z; N(2,1),N(2,2),G$,G1,G2,G3,G4,G5,G6,G7
  112. 3940 PRINT 
  113. 3950 PRINT "IS ";N(2,2);" ";G$;" THE CORRECT ACCOUNT?"
  114. 3960 PRINT :INPUT "(Y OR N) ";line temp$
  115. 3970 if left$(temp$,1)="n" or left$(temp$,1)="N" then 3920
  116. 3980 if left$(temp$,1)<>"y" and left$(temp$,1)<>"Y" then 3940
  117. 3990 G1=G1+T3:G2=G2+T3:G3=G3+T3
  118. 4000 print #1,z; n(2,1),n(2,2),g$,g1,g2,g3,g4,g5,g6,g7
  119.      LPRINTER
  120. 4010 print 
  121. 4020 print "(X)";tab(5);"TOTAL FED TAX PAYABLE POSTED";tab(62);
  122.      print using l$;t3
  123.      CONSOLE
  124. 4030 PRINT 
  125. 4040 INPUT "ENTER STATE TAX PAYABLE ACCOUNT RECORD # - ";Z
  126. 4050 read #1,z; N(2,1),N(2,2),G$,G1,G2,G3,G4,G5,G6,G7
  127. 4060 PRINT 
  128. 4070 PRINT "IS ";N(2,2);" ";G$;" THE CORRECT ACCOUNT?"
  129. 4080 PRINT :INPUT "(Y OR N) ";line temp$
  130. 4090 if left$(temp$,1)="n" or left$(temp$,1)="N" then 4040
  131. 4100 if left$(temp$,1)<>"y" and left$(temp$,1)<>"Y" then 4060
  132. 4110 G1=G1+T6:G2=G2+T6:G3=G3+T6
  133. 4120 print #1,z; n(2,1),n(2,2),g$,g1,g2,g3,g4,g5,g6,g7
  134.      LPRINTER
  135. 4130 print 
  136. 4140 print "(X)";tab(5);"TOTAL STATE TAX PAYABLE POSTED";tab(62);
  137.      print using l$;t6
  138. 4150 print 
  139. 4160 print TAB(62);"----------------"
  140. 4170 print "TOTAL NET SALARIES AND DEDUCTIONS POSTED";
  141. 4180 print TAB(62);:print using l$;P4+S4+M4+F4+T3+T6
  142. 4190 print 
  143. 4200 print TAB(62);"================"
  144. 4210 print 
  145. 4220 print "GROSS PAY TOTAL";tab(62);:print using l$;t0
  146. 4230 print TAB(62);"================"
  147. 4240 print chr$(12):for z=1 to 100:next z:print chr$(12)
  148. 4250 close 1
  149. 4260 console
  150.     print "Replace payroll file disk in drive B."
  151.     Input "Type RETURN to continue - ";line temp$
  152.     initialize
  153. 4290 PRINT clear$
  154. 4300 chain "master5"
  155.