220 IF P = R AND C >1 THEN B$ = LEFT$(B$, LEN(B$) -1): POKE H,HT: PRINT B$; SPC( 2):C = C -1: GOTO 140
230 IF P = R AND C = 1 THEN B$ = "": POKE H,HT: PRINT SPC( 2):C = 0
240 GOTO 140
250 VTAB 20: POKE H,4: CALL -1052: PRINT "ESCape Key Pressed - Do You Wish To Return To The Main Menu? (Y/N)";: GOSUB 280: IF P = 89 OR P = 121 THEN 1250
260 IF P = 78 OR P = 110 THEN POKE H,0: CALL -868: VTAB V1: GOTO 140
270 GOTO 250
280 P = PEEK(KB): IF P <128 THEN 280
290 POKE KS,0:P = P -128: IF P = 127 THEN P = 8: RETURN
300 IF LEFT$(N$,1) = "$" THEN N$ = RIGHT$(N$, LEN(N$) -1)
310 IF MID$ (N$,2,1) = "$" THEN N$ = LEFT$(N$,1) + RIGHT$(N$, LEN(N$) -H4)
320 RETURN
330 FOR I = 1 TO LEN(N$)
340 IF MID$ (N$,I,1) = "," THEN N$ = LEFT$(N$,I -1) + RIGHT$(N$, LEN(N$) -I)
350 NEXT : RETURN
360 N$ = STR$( VAL(QU$(I)) * VAL(TC$(I))): GOSUB 650:MT = MT + VAL(N$): GOSUB 750: IF C = 0 THEN GOSUB 800
370 A$ = N$
380 N$ = TC$(I): GOSUB 650: GOSUB 750: IF C = 0 THEN GOSUB 800
860 HOME :M$ = "Main Menu": GOSUB 570: VTAB 18:: POKE H,21: PRINT "Pressing 'RETURN' Defaults To Drive 1": VTAB V1: POKE H,18: PRINT "What Drive Is Your Storage Disk In? (1-2)": RETURN
870 SP = 2:C$ = "Code Number Of Billing Item": GOSUB 120:N$ = B$: GOSUB 490: IF E = 1 THEN E = 0: GOTO 870
880 IF B$ < >"" THEN N = VAL(N$)
890 RETURN
900 IF N <1 OR N >NI THEN HOME : VTAB 10: POKE H,24: INVERSE : CALL -1052: PRINT "Your Code Number Does Not Exist!";: NORMAL : VTAB V1: POKE H,33: INVERSE : PRINT "Please Retype";: NORMAL : GOSUB 1000:E = 1
910 RETURN
920 VTAB 18: CALL -868: POKE H,H1: PRINT "Press 'RETURN' When You Are Finished Entering Items": RETURN
930 IF RIGHT$(N$,1) = "%" THEN N$ = LEFT$(N$, LEN(N$) -1):N$ = STR$( VAL(N$)/100)
940 RETURN
950 IF SGN( VAL(N$)) = -1 AND INT( ABS( VAL(N$))) >9999 THEN 980
960 IF INT( VAL(N$)) >99999 THEN 980
970 GOTO 990
980 CALL -1052: VTAB 18: POKE H,18: INVERSE : PRINT "Your Number Is Too Large...Please Re-Enter";: NORMAL : GOSUB 1000: VTAB 18: POKE H,0: CALL -868:E = 1
1500 C$ = "Date Of Charges- (MM/DD/YY)": GOSUB 120: IF P = ES THEN VTAB H5: POKE H,0: GOSUB 6520: GOTO 1470
1510 GOSUB 6450: IF DF THEN 1500
1520 DJ$ = B$: IF F >0 THEN FOR I = 1 TO F:QU$(I) = "":TD$(I) = "":TC$(I) = "":TT$(I) = "": NEXT :F = 0:HL = 0:GT = 0:MT = 0
1530 HOME : GOSUB 920: GOSUB 870: IF B$ = "" THEN 1720
1540 N$ = B$: GOSUB 490: IF E = 1 THEN E = 0: GOTO 1530
1550 GOSUB 900: IF E = 1 THEN E = 0: GOTO 1530
1560 IF F = 0 THEN 1590
1570 GOSUB 1030
1580 IF FL = 1 THEN FL = 0: CALL -1052: VTAB H1: POKE H,16: PRINT "Code Number ";N;" Is Already Used In This Statement!": GOSUB 1000: VTAB H7: CALL -868: GOTO 1530
2320 VTAB H1: POKE H,29: PRINT "Choose A Number (1-3)":M$ = "Statement Editing Menu": GOSUB 570
2330 GOSUB 280: IF P = ES THEN 2170
2340 IF P <V5 OR P >51 THEN 2330
2350 IF P = V5 THEN GOSUB 2380: GOTO 2450
2360 IF P = V6 THEN GOSUB 2380: GOTO 2530
2370 IF P = 51 THEN 2610
2380 C$ = "Code Number Of Item On The Statement":SP = 2: HOME :M$ = "Billing Item Editing Menu": GOSUB 570: GOSUB 120: ON B$ = "" GOTO 2280: IF P = ES THEN 2280
2390 N$ = B$: GOSUB 490: IF E = 1 THEN E = 0: GOTO 2380
2400 N = VAL(N$): GOSUB 900: IF E = 1 THEN E = 0: GOTO 2380
2410 GOSUB 1030
2420 IF FL = 0 THEN CALL -1052: VTAB H1: POKE H,17: PRINT "Code Number ";N;" Is Not Used In This Statement!": GOSUB 1000: VTAB H7: CALL -868: GOTO 2380
2430 FL = 0
2440 RETURN
2450 HOME : PRINT DE$(N): VTAB V1: POKE H,20: PRINT "Do You Wish To Delete This Item? (Y/N)":M$ = "Main Menu": GOSUB 570: GOSUB 600
2460 IF E = 1 THEN E = 0: GOSUB 2380: GOTO 2450
2470 FOR I = 1 TO F
2480 IF TD$(I) = DE$(N) THEN PT = I
2490 NEXT
2500 FOR I = PT TO F:TD$(I) = TD$(I +1):TC$(I) = TC$(I +1):TT$(I) = TT$(I +1):QU$(I) = QU$(I +1): NEXT :F = F -1
2510 FOR X = M +PT -1 TO M +F -1: POKE X, PEEK(X +1): NEXT
2520 GOTO 2170
2530 FOR I = 1 TO F
2540 IF TD$(I) = DE$(N) THEN PT = I
2550 NEXT
2560 HOME : PRINT TD$(PT): VTAB 10: PRINT "The Quantity Billed Was ";QU$(PT)
2570 C$ = "The Correct Quantity Billed Is":SP = 4: GOSUB 120:N$ = B$: GOSUB 490: IF E = 1 THEN E = 0: GOTO 2570
2580 GOSUB 330
2590 IF B$ < >"" THEN QU$(PT) = N$
2600 GOTO 2170
2610 HOME : GOSUB 920: GOSUB 870: IF B$ = "" THEN 1250
2620 N$ = B$: GOSUB 490: IF E = 1 THEN E = 0: GOTO 2610
2630 GOSUB 900: IF E = 1 THEN E = 0: GOTO 2610
2640 IF F = 0 THEN 2670
2650 GOSUB 1030
2660 IF FL = 1 THEN FL = 0: CALL -1052: VTAB H1: POKE H,16: PRINT "Code Number ";N;" Is Already Used In This Statement!": GOSUB 1000: VTAB H7: CALL -868: GOTO 2610
3690 V3 = H4:H3 = 25:TI$ = " D A T A F I L E M E N U ": GOSUB 830
3700 VTAB R: POKE H,H2: PRINT "1.) Setup The DATA File": VTAB 10: POKE H,H2: PRINT "2.) Add A Billing Item": VTAB V1: POKE H,H2: PRINT "3.) Delete A Billing Item"
3710 VTAB H7: POKE H,H2: PRINT "4.) Edit A DATA File Item": PRINT : POKE H,H2: PRINT "5.) Make A Printout Of The DATA File": PRINT : POKE H,H2: PRINT "6.) Review DATA File On Screen"
3720 VTAB 21: POKE H,29: PRINT "Choose A Number (1-6)":M$ = "Main Menu": GOSUB 570
3730 GOSUB 280: IF P = ES THEN 1250
3740 P = P -V4: IF P <1 OR P >6 THEN 3730
3750 ON P GOTO 3760,3870,4050,4190,4940,5170
3760 HOME :C$ = "Your Name":SP = V6: GOSUB 120: IF B$ < >"" THEN NA$ = B$
3770 C$ = "Your Company's Name": GOSUB 120: IF B$ < >"" THEN NC$ = B$
3780 C$ = "Your Street Address": GOSUB 120: IF B$ < >"" THEN AD$ = B$
3790 C$ = "Your City": GOSUB 120: IF B$ < >"" THEN CI$ = B$
3800 C$ = "Your State":SP = H7: GOSUB 120: IF B$ < >"" THEN ST$ = B$
4170 FOR I = N TO NI:DE$(I) = DE$(I +1):CU$(I) = CU$(I +1):TY$(I) = TY$(I +1):T%(I) = T%(I +1): NEXT :NI = NI -1
4180 GOTO 3690
4190 V3 = 1:H3 = 17:TI$ = " D A T A F I L E E D I T I N G M E N U ": GOSUB 830
4200 VTAB R: POKE H,H2: PRINT "1.) Change A Description": POKE H,H2: PRINT "2.) Change The Unit Of Measurement": POKE H,H2: PRINT "3.) Change The Cost/Unit": POKE H,H2: PRINT "4.) Change The Tax Status Of An Item"
4210 POKE H,H2: PRINT "5.) Change The Sales Tax Rate": POKE H,H2: PRINT "6.) Change Your Hourly Labor Rate": POKE H,H2: PRINT "7.) Change Your Name"
4220 POKE H,H2: PRINT "8.) Change Your Company Name": POKE H,H2: PRINT "9.) Change Your Address": PRINT
4230 VTAB 21: POKE H,29: PRINT "Choose A Number (1-9)":M$ = "Data File Menu": GOSUB 570
4240 GOSUB 280: IF P = ES THEN 3690
4250 IF P <V5 OR P >57 THEN 4240
4260 P = P -V4
4270 ON P GOTO 4280,4330,4390,4470,4560,4610,4650,4680,4710
4280 HOME : GOSUB 870: IF B$ = "" THEN 4190
4290 GOSUB 900: IF E = 1 THEN E = 0: GOTO 4280
4300 HOME : VTAB R: PRINT "The Present Description Is ";DE$(N)
4310 C$ = "New Description":SP = V4: GOSUB 120: IF B$ < >"" THEN DE$(N) = B$
4320 GOTO 4190
4330 HOME : GOSUB 870: IF B$ = "" THEN 4190
4340 GOSUB 900: IF E = 1 THEN E = 0: GOTO 4330
4350 HOME : VTAB R: PRINT "The Billing Item Is ";DE$(N): VTAB 10: PRINT "The Existing Unit Of Measurement Is ";TY$(N)
4360 C$ = "New Unit Of Measurement":SP = H4: VTAB 18: POKE H,22: PRINT "Pressing 'RETURN' Defaults To 'Ea'": GOSUB 120: IF B$ = "" THEN B$ = "Ea"
4370 TY$(N) = B$
4380 GOTO 4190
4390 HOME : GOSUB 870: IF B$ = "" THEN 4190
4400 GOSUB 900: IF E = 1 THEN E = 0: GOTO 4390
4410 A = N
4420 N$ = CU$(N): GOSUB 750: GOSUB 800: HOME : VTAB R: PRINT "The Billing Item Is ";DE$(N): VTAB 10: PRINT "The Existing Cost/Unit Is ";Y$
4430 C$ = "New Cost/Unit":SP = R: GOSUB 120:N$ = B$: GOSUB 300: GOSUB 330: GOSUB 490: IF E = 1 THEN E = 0: GOTO 4430
4440 GOSUB 950: IF E = 1 THEN E = 0: GOTO 4430
4450 IF B$ < >"" THEN GOSUB 650:CU$(A) = N$
4460 GOTO 4190
4470 HOME : GOSUB 870: IF B$ = "" THEN 4190
4480 GOSUB 900: IF E = 1 THEN E = 0: GOTO 4470
4490 IF T%(N) = 0 THEN G$ = "Non-Taxable": GOTO 4510
4500 G$ = "Taxable"
4510 HOME : VTAB R: PRINT "The Billing Item Is ";DE$(N): VTAB 10: PRINT "This Item Is Currently ";G$: VTAB V1: PRINT "Do You Wish To Change It? (Y/N)"
4520 GOSUB 600
4530 IF E = 1 THEN E = 0: GOTO 4190
4540 IF T%(N) = 0 THEN T%(N) = 1: GOTO 4190
4550 T%(N) = 0: GOTO 4190
4560 HOME : VTAB 10: PRINT "Your Sales Tax Rate Is Presently ";TA: GOSUB 570
4570 C$ = "New Sales Tax Rate- Example: Enter 6.5% As .065":SP = 6: GOSUB 120:N$ = B$: GOSUB 930: GOSUB 490: IF E = 1 THEN E = 0: GOTO 4570
4580 IF B$ < >"" THEN TA = VAL(N$)
4590 N$ = STR$(HR): GOSUB 750: GOSUB 800
4600 GOTO 4190
4610 N$ = STR$(HR): GOSUB 650: HOME : VTAB 10: PRINT "Present Hourly Rate Is $";N$: GOSUB 570
4620 C$ = "New Hourly Labor Rate":SP = 6: GOSUB 120:N$ = B$: GOSUB 300: GOSUB 330: GOSUB 490: IF E = 1 THEN E = 0: GOTO 4620
4630 IF B$ < >"" THEN GOSUB 650:HR = VAL(N$)
4640 GOTO 4190
4650 HOME : VTAB 10: PRINT "Your Name Is ";NA$
4660 C$ = "Your Correct Name Is":SP = V6: GOSUB 120: IF B$ < >"" THEN NA$ = B$
4670 GOTO 4190
4680 HOME : VTAB 10: PRINT "Your Company Name Is ";NC$
4690 C$ = "The Correct Name Is":SP = V6: GOSUB 120: IF B$ < >"" THEN NC$ = B$
5290 C = C +1: IF C = 15 AND I <NI THEN C = 0: PRINT : PRINT : POKE H,7: PRINT "Press Any Key To Continue Or 'ESCape' To Return To The Main Menu": PRINT : GOSUB 280: HOME : IF P = ES THEN 1250
5300 NEXT I
5310 PRINT : PRINT : POKE H,H2: PRINT "Press Any Key To Return To The Main Menu": GOSUB 280: POKE 34,0: GOTO 1250
5320 V3 = H4:H3 = 29:TI$ = " D I S K M E N U ": GOSUB 830
5330 VTAB R: POKE H,H2: PRINT "1.) Save An Existing Statement"
5340 VTAB 10: POKE H,H2: PRINT "2.) Load A Statement From The Disk"
5350 VTAB V1: POKE H,H2: PRINT "3.) Delete A Statement From The Disk"
5360 VTAB H7: POKE H,H2: PRINT "4.) Create A Disk For Data Storage (DOS 3.3 Only)"
5370 VTAB 16: POKE H,H2: PRINT "5.) Update DATA File"
5380 VTAB 20: POKE H,29: PRINT "Choose A Number (1-5)":M$ = "Main Menu": GOSUB 570
5390 GOSUB 280: IF P = ES THEN 1250
5400 P = P -V4: IF P <1 OR P >H5 THEN 5390
5410 ON P GOTO 5420,5600,5740,5850,6010
5420 GOSUB 860:M$ = "Disk Menu": GOSUB 570
5430 GOSUB 280: IF P = ES THEN 5320
5440 IF P = H6 THEN P = 1: GOSUB 1070: GOTO 5470
5450 IF P <V5 OR P >V6 THEN 5430
5460 GOSUB 1060
5470 INPUT "What Name Do You Want To Call This File? ";F$
5480 GOSUB 6530: IF IV THEN 5320
5490 PRINT : POKE H,H2: PRINT "Press Any Key To Save, OR 'ESCape' TO Exit"
5500 GOSUB 280: IF P = ES THEN 1250
5510 PRINT D$;"OPEN";F$
5520 PRINT D$;"CLOSE"
5530 PRINT D$;"DELETE";F$
5540 PRINT D$;"OPEN";F$
5550 PRINT D$;"WRITE";F$
5560 PRINT CR$: PRINT CA$: PRINT CC$: PRINT CS$: PRINT CZ$: PRINT DB$: PRINT DJ$: PRINT HL: PRINT F: FOR I = 1 TO F: PRINT TA%(I): PRINT TD$(I): PRINT TC$(I): PRINT TT$(I): PRINT QU$(I): NEXT
5700 INPUT F: FOR I = 1 TO F: INPUT TA%(I): CALL 768:TD$(I) = MID$ (IN$,1): CALL 768:TC$(I) = MID$ (IN$,1): CALL 768:TT$(I) = MID$ (IN$,1): CALL 768:QU$(I) = MID$ (IN$,1): NEXT
5710 FOR X = M TO M +F -1: INPUT N: POKE X,N: NEXT
5720 PRINT D$;"CLOSE"
5730 GOTO 5320
5740 GOSUB 860:M$ = "Disk Menu": GOSUB 570
5750 GOSUB 280: IF P = ES THEN 5320
5760 IF P = H6 THEN P = 1: GOSUB 1070: GOTO 5790
5770 IF P <V5 OR P >V6 THEN 5750
5780 GOSUB 1060
5790 INPUT "What File Do You Wish To Delete? ";F$
5800 GOSUB 6530: IF IV THEN 5320
5810 PRINT : POKE H,18: PRINT "Press Any Key To Delete, Or 'ESCape' To Exit"
5820 GOSUB 280: IF P = ES THEN 5320
5830 PRINT D$;"DELETE";F$
5840 GOTO 5320
5850 IF PEEK(48896) = 76 THEN HOME : CALL -1052: VTAB V1: POKE H,18: PRINT "Sorry- This Option Does Not Work With ProDOS": GOSUB 1000: GOTO 5320
5860 HOME : VTAB 7: POKE H,35: INVERSE : CALL -1052: PRINT " WARNING ";: NORMAL : VTAB 10: POKE H,R: PRINT "This Option Formats A Disk For You To Store Your Statements On."
5870 VTAB V1: POKE H,20: PRINT "Any Data On Your Disk Will Be Destroyed!"
5880 VTAB 21: POKE H,ES: PRINT "Press 'ESCape' To Abort": VTAB V2: POKE H,24: PRINT "Press Any Other Key To Continue"
5890 GOSUB 280: IF P = ES THEN 5320
5900 GOSUB 860:M$ = "Disk Menu": GOSUB 570
5910 GOSUB 280: IF P = ES THEN 5320
5920 IF P = H6 THEN DP = 1: GOTO 5950
5930 IF P <V5 OR P >V6 THEN 5910
5940 P = P -V4:DP = P
5950 HOME : VTAB V1: POKE H,20: PRINT "Press Any Key To Erase And Initialize": VTAB H7: POKE H,26: PRINT "A Storage Disk In Drive #";DP: VTAB V2: POKE H,ES: PRINT "Press 'ESCape' To Abort": GOSUB 280: IF P = ES THEN 1250
5960 HOME : VTAB V1: POKE H,29: INVERSE : PRINT "INITIALIZING YOUR DISK";: NORMAL
6490 IF S1$ < >"/" OR S2$ < >"/" THEN DF = 1: GOTO 6510
6500 DF = 0
6510 RETURN
6520 FOR X5 = 1 TO 79: PRINT " ";: NEXT : RETURN
6530 NF = 1: IF LEN(F$) >0 THEN FOR NC = 1 TO LEN(F$):NA = ASC( MID$ (F$,NC,1)):NF = ((NA >64 AND NA <91) OR (NA = 46) OR (NA >47 AND NA <58 AND NC >1)) AND NF = 1: NEXT : IF LEN(F$) >15 OR NF = 0 THEN IV = 1: RETURN