home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
basic
/
billing.lbr
/
HISTORY.BZS
/
HISTORY.BAS
Wrap
BASIC Source File
|
1987-03-16
|
2KB
|
45 lines
10 ' ++++++++++ REPORT GENERATOR ++++++++++
20 ' This program will allow the operator to call up by month and by
30 ' customer, information about a prior bill.
40 '
50 ' +++++++++ DATA FILE INFORMATION ++++++++
60 ' The data file used is the one written each month by the billing
70 ' program. For example, November billing can be found in the file
80 ' called NOV.DAT.
100 '
110 ' +++++++++++ PROGRAM START +++++++++++++++
120 PRINT CHR$(26)
130 PRINT TAB(20);"TENANT HISTORY FILE"
140 PRINT STRING$(79,"-")
150 INPUT"Enter name of month the information is requested ";MONTH$
160 MONTH$=LEFT$(MONTH$,3)+".DAT"
170 INPUT"Enter Tenant Number information is requested for ";TENANT
180 OPEN"I",1,MONTH$
190 IF EOF(1) GOTO 230
200 INPUT#1,A,B,C,D,E,F$,G,H,I,J,H,L,M,N
210 IF B=TENANT THEN 500
220 GOTO 190
230 CLOSE
240 PRINT"Tenant not on file"
250 INPUT"Do you wish to search again (Y/N) ";ANSWER$
260 IF LEFT$(ANSWER$,1)="Y" THEN 170
270 CLOSE:RUN"MENU"
500 CLOSE:PRINT CHR$(26)
510 PRINT "TENANT NO.---------------------> ";:PRINT USING"#####";B
520 PRINT "BILLING DATE ------------------> ";LEFT$(F$,2);"/";MID$(F$,3,2);"/";RIGHT$(F$,2)
530 PRINT "RENT---------------------------> ";:PRINT USING"####.##";J/100
535 PRINT "ELECTRIC METER-----------------> ";:PRINT USING"#####";D
540 PRINT "GAS METER----------------------> ";:PRINT USING"#####";E
550 PRINT "UTILITY CHARGES----------------> ";:PRINT USING"####.##";H
560 PRINT "OTHER CHARGES------------------> ";:PRINT USING"####.##";L
570 PRINT "BALANCE FORWARD----------------> ";:PRINT USING"####.##";N
575 TOTAL=J+H+L+N
580 PRINT "TOTAL BILLED-------------------> ";:PRINT USING"####.##";TOTAL/100
590 PRINT
600 INPUT"Do you wish to see another (Y/N)";AN$
610 IF LEFT$(AN$,1)="N" THEN CLOSE:RUN"MENU"
620 GOTO 170
L/100
590 PRINT
600 INPUT"Do you wish to see another (Y/N)";AN$
610 IF LEFT$(AN$,1)="N" THEN CLOSE:RU