home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / basic / billing.lbr / HISTORY.BZS / HISTORY.BAS
BASIC Source File  |  1987-03-16  |  2KB  |  45 lines

  1. 10 '         ++++++++++ REPORT GENERATOR ++++++++++
  2. 20 ' This program will allow the operator to call up by month and by
  3. 30 ' customer, information about a prior bill.
  4. 40 '
  5. 50 '        +++++++++ DATA FILE INFORMATION ++++++++
  6. 60 ' The data file used is the one written each month by the billing
  7. 70 ' program. For example, November billing can be found in the file
  8. 80 ' called NOV.DAT.
  9. 100 '
  10. 110 '        +++++++++++ PROGRAM START +++++++++++++++
  11. 120 PRINT CHR$(26)
  12. 130 PRINT TAB(20);"TENANT HISTORY FILE"
  13. 140 PRINT STRING$(79,"-")
  14. 150 INPUT"Enter name of month the information is requested ";MONTH$
  15. 160 MONTH$=LEFT$(MONTH$,3)+".DAT"
  16. 170 INPUT"Enter Tenant Number information is requested for ";TENANT
  17. 180 OPEN"I",1,MONTH$
  18. 190 IF EOF(1) GOTO 230
  19. 200 INPUT#1,A,B,C,D,E,F$,G,H,I,J,H,L,M,N
  20. 210 IF B=TENANT THEN 500
  21. 220 GOTO 190
  22. 230 CLOSE
  23. 240 PRINT"Tenant not on file"
  24. 250 INPUT"Do you wish to search again (Y/N) ";ANSWER$
  25. 260 IF LEFT$(ANSWER$,1)="Y" THEN 170
  26. 270 CLOSE:RUN"MENU"
  27. 500 CLOSE:PRINT CHR$(26)
  28. 510 PRINT "TENANT NO.---------------------> ";:PRINT USING"#####";B
  29. 520 PRINT "BILLING DATE ------------------> ";LEFT$(F$,2);"/";MID$(F$,3,2);"/";RIGHT$(F$,2)
  30. 530 PRINT "RENT---------------------------> ";:PRINT USING"####.##";J/100
  31. 535 PRINT "ELECTRIC METER-----------------> ";:PRINT USING"#####";D
  32. 540 PRINT "GAS METER----------------------> ";:PRINT USING"#####";E
  33. 550 PRINT "UTILITY CHARGES----------------> ";:PRINT USING"####.##";H
  34. 560 PRINT "OTHER CHARGES------------------> ";:PRINT USING"####.##";L
  35. 570 PRINT "BALANCE FORWARD----------------> ";:PRINT USING"####.##";N
  36. 575 TOTAL=J+H+L+N
  37. 580 PRINT "TOTAL BILLED-------------------> ";:PRINT USING"####.##";TOTAL/100
  38. 590 PRINT
  39. 600 INPUT"Do you wish to see another (Y/N)";AN$
  40. 610 IF LEFT$(AN$,1)="N" THEN CLOSE:RUN"MENU"
  41. 620 GOTO 170
  42. L/100
  43. 590 PRINT
  44. 600 INPUT"Do you wish to see another (Y/N)";AN$
  45. 610 IF LEFT$(AN$,1)="N" THEN CLOSE:RU