ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

124 lines
3.5 KiB

  1. 1 rem This is the Aged Accounts Payable Statement Printer
  2. %INCLUDE ALL.BAS
  3. 500 RESTORE
  4. dim n(2,20),k$(3,20),h(9),s(9),t(4,9)
  5. 1009 PRINT clear$:PRINT
  6. 1020 N(1,3)=24:N(1,4)=24:N(1,5)=24:N(1,6)=17:N(1,7)=2:N(1,8)=5
  7. 1025 N(1,9)=14:N(1,10)=24:N(1,11)=24:N(1,12)=24:N(1,13)=17:N(1,14)=2
  8. 1030 N(1,15)=5:N(1,16)=14:N(1,17)=8
  9. 1080 Q$="A G E D A C C O U N T S P A Y A B L E R E P O R T"
  10. 1090 U$="#,###,###.##":u1$="##########":u2$="###,###.##"
  11. 1100 REM GET DATES ROUTINE
  12. 1145 Z9=0
  13. 1200 REM READ TAB VALUES ROUTINE
  14. for z=1 to t%(1):del$=del$+"*":del1$=del1$+"=":del2$=del2$+"-":next z
  15. 3000 REM READ NAME FILE SUBROUTINE
  16. 3005 a5=T%(12)
  17. 3080 Z=24:Z9=1
  18. 3090 FOR Z0=1 TO 4
  19. 3100 K$(0,Z0)=MID$(N$,Z9,Z)
  20. 3110 Z9=Z9+Z
  21. 3120 NEXT Z0
  22. 3125 REM ROUTINE TO ELIMINATE TRAILING BLANKS
  23. l8=1
  24. 3130 FOR I=1 TO 4
  25. l9=len(k$(0,i))
  26. 3140 for z=l9 to l8 step -1
  27. 3150 IF MID$(K$(0,I),Z,1)<>" " THEN 3170
  28. 3160 NEXT Z
  29. 3170 Z$=""
  30. 3180 FOR Z0=1 TO Z
  31. 3190 Z$=Z$+MID$(K$(0,I),Z0,1)
  32. 3200 NEXT Z0
  33. 3210 K$(0,I)="":K$(0,I)=Z$
  34. 3220 NEXT I
  35. 6000 REM PRINT AGED ACCOUNTS PAYABLE REPORT
  36. 6005 PRINT clear$:PRINT
  37. 6010 PRINT "PRINTING AGED ACCOUNTS PAYABLE REPORT"
  38. 6015 FOR Z=0 TO 9
  39. 6020 H(Z)=0:S(Z)=0:T(0,Z)=0:T(1,Z)=0:T(2,Z)=0:T(3,Z)=0:A(Z)=0
  40. 6025 NEXT Z
  41. 6030 T1=0:T2=0:T3=0:T4=0:P0=1
  42. 6035 X=1
  43. 6100 P9=0
  44. 6200 open "vp" recl 384 as 1
  45. 6205 z3=(size("vp")*block.size)/384
  46. 6210 FOR Z2=1 TO Z3
  47. 6215 read #1,z2;n(2,1),n(2,2),n$
  48. 6220 IF N(2,2)=0 THEN 6230
  49. 6225 NEXT Z2
  50. 6230 close 1
  51. 6235 Z2=Z2-1
  52. 6240 PRINT:PRINT "RECORDS TO BE PRINTED ";Z2
  53. 6245 PRINT:INPUT "TO DO PRINT REPORT, TYPE RETURN.";line temp$
  54. lprinter
  55. 6300 open "vp" recl 384 as 1
  56. 6310 J=1
  57. 6320 FOR K=1 TO (Z2/10)+1
  58. 6330 GOSUB 9600
  59. 6340 FOR I=J TO J+9
  60. 6350 GOSUB 15000
  61. 6360 NEXT I
  62. 6370 GOSUB 9700:J=J+10
  63. 6380 NEXT K
  64. 6390 GOSUB 15600
  65. 6400 GOSUB 9800
  66. 6410 GOTO 20000
  67. 9600 REM PRINT PAGE HEADING SUBROUTINE
  68. 9610 print del$:P9=P9+1
  69. 9615 print:P9=P9+1
  70. 9616 print TAB((T%(1)-LEN(Q$))/2);Q$:P9=P9+1
  71. 9617 print:P9=P9+1
  72. 9620 FOR Z=2 TO 4
  73. 9625 print TAB((T%(1)-LEN(K$(0,Z)))/2);K$(0,Z):P9=P9+1
  74. 9630 NEXT Z
  75. 9635 print:P9=P9+1
  76. 9640 print TAB(T%(10));"DATE ";D$(X);TAB(T%(11));"PAGE #";P0
  77. 9642 P9=P9+1
  78. 9645 print del1$:P9=P9+1
  79. 9650 print " REC# - NAME";TAB(36);"DATE OF LAST PAYMENT - AMOUNT";
  80. 9655 print TAB(67);"YTD PAYMENTS"
  81. 9660 print "ACCT# - PHONE#";TAB(29);"CUR-CHGS";" 30-60/CHGS";
  82. 9665 print " 60-90/CHGS 90+/CHGS"
  83. 9670 print del1$:P9=P9+1
  84. 9695 RETURN
  85. 9700 REM REPORT CONTINUED SUBROUTINE
  86. 9705 print del1$
  87. 9710 print "Report continues on next page"
  88. 9715 print del1$
  89. 9720 print chr$(12):P9=0
  90. 9725 P0=P0+1
  91. 9740 RETURN
  92. 9800 REM End of report ROUTINE
  93. 9810 print del1$
  94. 9820 print "End of report"
  95. 9830 print del$
  96. 9840 print chr$(12)
  97. 9845 FOR Z=1 TO 100:NEXT Z:print chr$(12)
  98. 9850 RETURN
  99. 15000 IF I>Z2 THEN 15595
  100. 15005 read #1,i;n(2,1),n(2,2),n$,c1,c2,c3,c4,c5,c6
  101. 15020 Z9=1:FOR Z=3 TO 17:K$(3,Z)=MID$(N$,Z9,N(1,Z)):Z9=Z9+N(1,Z):NEXT Z
  102. 15030 print I;" - ";K$(3,4);TAB(43);K$(3,17);TAB(53);
  103. print using u$;c1;tab(68);c2
  104. 15050 print using u1$;n(2,2);:print " ";k$(3,9);:print using u2$;c3;
  105. print using u$;tab(38);c4;tab(53);c5;tab(68);c6
  106. 15070 IF C3+C4+C5+C6>=0 THEN 15090
  107. 15080 print TAB(57);"*** CREDIT BALANCE ***"
  108. 15090 T1=T1+C3:T2=T2+C4:T3=T3+C5:T4=T4+C6
  109. 15550 print:print
  110. 15595 RETURN
  111. 15600 print :print
  112. 15700 print del1$
  113. 15710 T5=T4+T3+T2+T1
  114. 15720 print "TOTALS:";TAB(27);:print using u2$;t1;tab(38);
  115. print using u$;t2;tab(53);t3;tab(68);t4
  116. 15730 print "REPORT TOTAL:";TAB(68);:print using u$;t5
  117. 15740 print del1$
  118. 15795 RETURN
  119. 20000 REM ROUTINE TO CLOSE FILES AND RETURN TO master3
  120. 20005 close 1
  121. 20040 console
  122. 20050 CHAIN "master3"