Compucolor.org – Virtual Media

Listing of file='INVCE.BAS;01' on disk='vmedia/invoice_order-sector.ccvf'

0 GOTO 10
5 GOTO 400
10 PLOT 12,14,3,15,2:PRINT "*** GENERAL INVOICE PROGRAM ***":PRINT
20 PRINT "WHEN YOU RUN THIS PROGRAM THE FIRST TIME ENTER YOUR PERSONAL"
30 PRINT "DATA IN THE LINE 140 FOLLOWING THE DATA STATEMENT IN THE"
40 PRINT "FORM:
50 PRINT "140 DATA 'YOUR NAME','ABBREVIATION','ADDRESS','CITY, STATE, ZIP','PHONE NUMBER'"
60 PRINT "USE AS QUOTES (') ALWAYS THE DOUBLE QUOTES"
70 PRINT "AS SECOND STEP DELETE LINE #0 BY TYPING 0 <RETURN>"
80 PRINT "THEN SAVE THIS VERSION ON AN EMPTY DISK UNDER THE NAME MENU"
90 PLOT 15:END
100 CHR$ INPUT
110 REM  PROGRAM COPYRIGHT BY *EIKE MUELLER*
115 REM
120 REM  VERS. 820104
125 REM
129 REM 
130 REM  LINE 140 DATA "NAME","ABBREVIATION","ADDRESS","CITY, STATE ZIP","PHONE NUMBER"
140 REM  DATA LINE
141 DATA "PHONE: (205)881-3800"
150 NN= LEN (NN$):NN= INT (NN/ 2):NN= 30- NN:RETURN
200 MT= INT (MT* 100+ .5)
210 SG$= " ":IF MT< 0THEN SG$= "-":MT= ABS (MT)
220 A1$= STR$ (INT (MT/ 100))
230 A2$= "."+ RIGHT$ (STR$ (MT+ 100- INT (MT/ 100)* 100),2)
240 MT$= RIGHT$ ("  "+ SG$+ A1$+ A2$,8)
250 RETURN
400 REM
410 POKE 33289,120
500 CLEAR 5000
501 PLOT 27,24
505 DIM IN$(25),DE$(25),QT(25),SP(25)
508 RESTORE 140:READ NN$:GOSUB 150
510 PLOT  12,3,NN,1,14,30,20,29,22
520 PRINT " "+ NN$+ " "
525 READ NN$:GOSUB 150
530 PLOT  15,3,NN,2,30,17,29,23
540 PRINT " "+ NN$+ " "
550 PLOT 6,2
560 A= 4:REM  A= FIRST LINE FOR CLEAR DISPLAY
570 REM

580 PRINT :PRINT TAB( 5):INPUT "DO YOU WANT TO RETRIEVE DATA FROM SALES OR PROPOSALS? ";RP$
590 IF LEFT$ (RP$,1)= "Y"THEN 4000
600 GOSUB 6000
610 PRINT TAB( 5):INPUT "ENTER CUSTOMER NAME     ";NA$
615 PRINT TAB( 5):INPUT "ENTER ATTN:             ";AT$
620 PRINT TAB( 5):INPUT "ENTER # AND STREET      ";NS$
630 PRINT TAB( 5):INPUT "ENTER CITY, STATE, ZIP  ";CS$
640 PRINT TAB( 5):INPUT "ENTER PHONE NUMBER      ";PH$
650 PRINT :PRINT TAB( 5):INPUT "ENTER SALES TAX IN    % ";TX
655 PRINT TAB( 5):INPUT "SPECIAL DISCOUNT      % ";DC
658 PRINT TAB( 5):INPUT "PAYMENT RECEIVED      $ ";LB
659 IF LB> 0THEN 668
660 PRINT TAB( 5):INPUT "CHARGED?                ";CH$
661 IF LEFT$ (CH$,1)< > "Y"THEN CH$= "":GOTO 668
662 CH$= "Y":PRINT TAB( 5):INPUT "ENTER CREDIT CARD       ";CC$
663 PRINT TAB( 5):INPUT "ENTER CARD NUMBER       ";CN$
668 PRINT :PRINT TAB( 5):INPUT "ENTER DATE (MM/DD/YY)   ";DA$
670 PRINT TAB( 5):INPUT "PROPOSAL OR ORDER?      ";PO$
672 IF LEFT$ (PO$,1)= "O"THEN PRINT :PRINT TAB( 5):INPUT "EARLY PAYMENT DISCOUNT? ";ED$
674 IF LEFT$ (ED$,1)= "Y"THEN GOSUB 7000
675 PRINT :REM 
679 PLOT 6,1
680 IF LEFT$ (PO$,1)= "P"THEN OP$= "PROP.":GOTO 700
690 IF LEFT$ (PO$,1)= "O"THEN OP$= "INVOICE":GOTO 700
695 PLOT 28,11,7:GOTO 670
700 PRINT TAB( 5)OP$;
710 INPUT " NUMBER:         ";NN
711 NO= NO+ 1:IF NN< > 0THEN NO= NN
712 IF NO= 0THEN NO= 101
713 IF LEFT$ (PO$,1)= "O"THEN PRINT TAB( 5):INPUT "ENTER CUSTOMER ORDER #: ";OD$
714 IF OD$> "!"THEN OD$= "ORDER #"+ OD$
715 PRINT :PRINT TAB( 5):INPUT "ENTER NUMBER OF COPIES  ";CO
717 CO= CO+ 1
720 GOSUB 6000
730 L= 1:REM 

740 REM
750 GOSUB 6000
760 REM
770 PRINT TAB( 5):INPUT "ENTER ITEM NUMBER-OR END ";IN$(L)
775 IF IN$(L)= "END"THEN 940
780 PRINT TAB( 5):PRINT "ENTER ITEM DESCRIPTION   ";"                             ";
782 FOR X= 1TO 29:PLOT 26:NEXT X
783 PLOT 6,38:INPUT "";DE$(L)
784 PLOT 6,2
785 PRINT TAB( 5):INPUT "ENTER QUANTITY           ";QT(L)
790 PRINT TAB( 5):INPUT "ENTER SALES PRICE      $ ";SP(L)
800 GOSUB 6000
805 IF LEFT$ (AC$,1)= "Y"THEN 3000
810 PLOT 3,50,0:PRINT "COST SO FAR:"
820 PLOT 3,50,1:PRINT "$           "
830 S1= QT(L)* SP(L)
840 S2= S1- S1* DC/ 100
850 S3= S2+ S2* TX/ 100
860 SF= SF+ INT (S3* 100)/ 100
870 PLOT 3,53,1:PRINT SF
910 L= L+ 1
920 PLOT 3,0,4
930 GOTO 770
940 PLOT 28,11
941 J= 0
942 J= J+ 1
945 INPUT "ENTER COMMENT ";CO$(J)
950 IF CO$(J)= ""THEN 970
955 GOTO 942
970 A= 4:GOSUB 6000
980 GOSUB 3000
990 GOSUB 6500
999 REM 

1000 PE= 0:REM  PRINTOUT
1001 PRINT TAB( 10):INPUT "EPSON, PAPERTIGER, OR OTHER  PRINTER? ";PE$
1002 IF LEFT$ (PE$,1)= "P"OR LEFT$ (PE$,1)= "O"THEN GOSUB 6000:GOTO 1008
1003 IF LEFT$ (PE$,1)= "E"THEN 5000
1004 PLOT 7,28,11
1005 GOTO 1001
1008 IF LEFT$ (PE$,1)= "O"THEN PE= 1:GOTO 1020
1010 INPUT "HIT ENTER WHEN PRINTER DIP S4: 1,4,6 S3: 1,3,4,5,6,7 ON ";EN
1012 PRINT :PRINT "NOTE: PAPERTIGER BAUDRATE SET ON 1200 BAUD"
1014 PLOT 27,18,4
1020 GOSUB 6000
1030 PRINT TAB( 6):INPUT "HIT ENTER WHEN READY FOR PRINTOUT ";EN
1040 GOSUB 6000
1045 L= 0:C= 0:TC= 0
1050 PRINT :PRINT :PRINT :PRINT :PRINT :PRINT TAB( 22)"P R I N T I N G"
1060 POKE 33265,14:OUT 8,199
1061 IF PE= 1THEN 1065
1062 PLOT 17
1064 PLOT 29,2
1065 IF OD$> "!"THEN PRINT OD$;
1066 IF OD$> "!"THEN 1071
1070 PRINT OP$;" #";NO;
1071 IF PE= 1THEN 1090
1080 PLOT 31,1
1090 RESTORE 140:READ NN$:NN= LEN (NN$):NN= INT (32- NN/ 2)
1095 IF PE= 1THEN NN= LEN (NN$):NN= INT (40- NN/ 2)
1100 PRINT TAB( NN)NN$;
1101 IF PE= 1THEN PRINT TAB( 60)"DATE: ";DA$:GOTO 1135
1110 PLOT 29,2
1120 PRINT TAB( 60)"DATE: ";DA$
1130 PLOT 29,1
1135 READ NN$:NN= LEN (NN$):NN= INT (20- NN/ 2)
1136 IF PE= 1THEN NN= LEN (NN$):NN= INT (40- NN/ 2)
1140 PRINT TAB( NN)NN$
1141 IF PE= 1THEN 1155
1150 PLOT 30,1
1155 READ NN$:NN= LEN (NN$):NN= INT (25- NN/ 2)
1156 IF PE= 1THEN NN= LEN (NN$):NN= INT (40- NN/ 2)
1160 PRINT TAB( NN)NN$
1165 READ NN$:NN= LEN (NN$):NN= INT (25- NN/ 2)
1166 IF PE= 1THEN NN= LEN (NN$):NN= INT (40- NN/ 2)
1170 PRINT TAB( NN)NN$
1171 IF PE= 1THEN 1185
1180 PLOT 29,2:PRINT
1185 READ NN$:NN= LEN (NN$):NN= INT (36- NN/ 2)
1186 IF PE= 1THEN NN= LEN (NN$):NN= INT (40- NN/ 2)
1190 PRINT TAB( NN)NN$
1200 PRINT :PRINT
1201 IF PE= 1THEN 1220
1210 PLOT 30,2
1220 PRINT "TO-"
1221 IF PE= 1THEN PRINT TAB( 4)NA$:GOTO 1226
1225 PLOT 29,2:PRINT TAB( 4)NA$
1226 IF AT$< "!"THEN 1230
1227 IF PE= 1THEN PRINT TAB( 4)AT$:GOTO 1230
1228 PLOT 29,2:PRINT TAB( 4)AT$
1230 IF NS$< "!"THEN 1237
1231 IF PE= 1THEN PRINT TAB( 4)NS$:GOTO 1237
1235 PLOT 29,2:PRINT TAB( 4)NS$
1237 IF CS$< "!"THEN 1247
1240 REM
1241 IF PE= 1THEN PRINT TAB( 4)CS$:GOTO 1247
1245 PLOT 29,2:PRINT TAB( 4)CS$
1247 IF PH$< "!"THEN PRINT :GOTO 1260
1250 REM
1251 IF PE= 1THEN PRINT TAB( 4)PH$:PRINT :GOTO 1265
1255 PLOT 29,2:PRINT TAB( 4)PH$
1260 PLOT 31,1:PRINT
1265 IF PE= 1AND PO$= "P"THEN PRINT TAB( 5)"P R O P O S A L    F O R    T H E    F O L L O W I N G    I T E M S":GOTO 1281
1270 IF PO$= "P"THEN PRINT "P R O P O S A L    F O R    T H E    F O L L O W I N G    I T E M S "
1275 IF PE= 1AND PO$= "O"THEN PRINT TAB( 29)"I N V O I C E   # ";NO:GOTO 1281
1280 IF PO$= "O"THEN PRINT TAB( 21)"I N V O I C E   # ";NO
1281 IF PE= 1THEN PRINT :GOSUB 6900:PRINT :GOTO 1287
1282 PRINT
1285 PLOT 30,2:PRINT :FOR X= 1TO J:PRINT CO$(X):NEXT X
1286 PRINT :PLOT 30,1:GOTO 1290
1287 IF PE= 1THEN PRINT "===============================================================================":PRINT
1288 PRINT "LINE# ITEM#    ITEM DESCRIPTION               QUANTITY     UNIT PRICE   AMOUNT"
1289 PRINT "_______________________________________________________________________________":GOTO 1310
1290 PRINT "==================================================="
1292 PLOT 30,2
1295 PRINT "LINE# ITEM#      ITEM DESCRIPTION                    QUANTITY        UNIT PRICE     AMOUNT"
1300 PRINT "___________________________________________________________________________________________"
1310 PRINT
1320 L= L+ 1:C= C+ 1:IF C= 5THEN C= 1:PRINT
1330 IF QT(L)< 1THEN 1390
1340 REM
1350 MT= SP(L):GOSUB 200
1355 IF PE= 1THEN 6700
1360 PRINT LTAB( 4)IN$(L)TAB( 17)DE$(L)TAB( 55)QT(L)TAB( 69)MT$;
1362 MT= SP(L)* QT(L):GOSUB 200
1364 PRINT TAB( 78)MT$
1370 TC= TC+ SP(L)* QT(L):TC= INT (TC* 100)/ 100
1380 GOTO 1320
1390 IF PE= 1THEN PRINT "_______________________________________________________________________________":GOTO 1410
1400 PRINT "___________________________________________________________________________________________"
1410 PRINT
1411 IF PE= 1THEN 1425
1420 PLOT 30,1
1425 MT= TC:GOSUB 200
1430 PRINT "TOTAL VALUE OF THESE ITEMS:";TAB( 32)"$";TAB( 35)MT$
1440 DI= TC* DC/ 100:DI= INT (DI* 100)/ 100
1445 IF DC= 0THEN 1460
1446 EP= TC- DI
1447 MT= - DI:GOSUB 200
1450 PRINT "SPECIAL DISCOUNT :";DC;" %";TAB( 35)MT$
1460 TT= (TC- DI)* TX/ 100:TT= INT (TT* 100)/ 100
1465 IF TX= 0THEN 1480
1467 MT= TT:GOSUB 200
1470 PRINT "SALES TAX: ";TX;" %";TAB( 35)MT$
1480 REM
1481 IF SH= 0THEN 1485
1482 MT= SH:GOSUB 200
1484 PRINT "SHIPMENT:";TAB( 35)MT$
1485 IF LB= 0THEN 1490
1486 MT= - LB:GOSUB 200
1487 PRINT "PAYMENT RECEIVED ";TAB( 35)MT$
1490 PRINT TAB( 32)"----------------"
1492 YP= TC- DI+ TT+ SH- LB
1495 MT= YP:GOSUB 200:IF CH$= "Y"THEN PRINT "CHARGED TO ";CC$;TAB( 32)"$ ";TAB( 35)MT$:GOTO 1504
1496 IF YP< 0THEN PRINT "CREDIT BALANCE: ";TAB( 32)"$ ";TAB( 35)MT$:GOTO 1502
1499 IF PO$= "P"THEN PRINT "YOUR COST:";TAB( 32)"$ ";TAB( 35)MT$:GOTO 1502
1500 PRINT "PLEASE PAY:";TAB( 32)"$ ";TAB( 35)MT$
1502 PRINT TAB( 32)"================":PRINT
1503 IF DD> 0THEN DK= INT (EP* DD)/ 100:MT= DK:GOSUB 200:PRINT "IF YOU PAY BY ";DD$;" SUBTRACT ";TAB( 32)"$ ";TAB( 35)MT$
1504 IF CH$= "Y"THEN PRINT :PRINT CC$;" CARD NUMBER: ";CN$:PRINT
1505 IF PE= 1THEN PRINT "===============================================================================":GOTO 1515
1510 PRINT "==================================================="
1515 IF PO$= "O"AND PE= 1THEN PRINT :PRINT TAB( 30)"T H A N K     Y O U":GOTO 1530
1516 IF PE= 1THEN 1522
1520 IF PO$= "O"THEN PRINT :PRINT TAB( 15)"T H A N K     Y O U":GOTO 1530
1522 IF PO$= "P"AND PE= 1THEN PRINT :PRINT TAB( 29)"PLEASE LET ME KNOW":GOTO 1530
1525 IF PO$= "P"THEN PRINT :PRINT TAB( 15)"PLEASE LET ME KNOW"
1530 PLOT 12
1540 PLOT 19:WAIT 1,128,128:OUT 8,207:POKE 33265,0
1550 CO= CO- 1:IF CO< 1THEN 1600
1560 PLOT 28,11
1580 GOTO 1000
1590 REM

1600 A= 4:GOSUB 6000:GOSUB 7300:REM  PRINT LABEL"
1610 A= 4:GOSUB 6000:REM  UPDATE DATA FILE
1620 PRINT TAB( 10):INPUT "HIT ENTER WHEN COMP DATA BASE IS INSERTED ";EN
1630 FILE "T",6200
1640 FILE "R",1,"COMP",8
1650 LI= 0
1700 LI= LI+ 1:IF LI> 500THEN 2000:REM  >200 FOR COMPUCOLOR
1710 GET 1,LI;NB
1720 IF NB< 1THEN 1800
1730 GOTO 1700
1790 REM  

1800 REM  UPDATE DATA BASE
1805 TD= TC- DI
1810 PUT 1,LI;NO,PO$[1],NA$[20],PH$[14],TC,DI,SH,TT,LB,YP
1820 FILE "C",1
1830 PRINT TAB( 10):PRINT "COMP DATA FILE IS UPDATED"
1840 PRINT :PRINT TAB( 10):INPUT "FINISHED WITH THESE ACTIVITIES? ";EN$
1850 IF LEFT$ (EN$,1)= "N"THEN RUN
1860 PLOT 12,3,15,15:PRINT "A U F   W I E D E R S E H E N"
1870 PLOT 3,0,0:INPUT "";EN
1880 RUN
1990 REM  

2000 A= 4:GOSUB 6000
2010 PRINT "THERE IS NO MORE ROOM IN THIS DATA BASE"
2020 PRINT :INPUT "PLEASE INSERT ANOTHER DISK FOR THE DATA & HIT ENTER ";EN
2040 GOTO 6240
2990 REM

3000 REM  REVIEW ITEMS
3005 PLOT 3,50,0:PRINT "            ":PLOT 3,50,1:PRINT "            ":GOSUB 6000
3010 L= 0:C= 0:TC= 0
3012 PLOT 3,0,4,11:PRINT TAB( 15):INPUT "ENTER SHIPMENT & HANDLING ";SH
3015 PLOT 3,0,4
3020 PRINT "LINE # QTY.  ITEM DESCRIPTION               COST        TOTAL  "
3030 PRINT "______________________________________________________________"
3040 PRINT
3050 L= L+ 1:C= C+ 1:IF C= 12THEN C= 0:A= 7:PRINT "______________________________________________________________":GOSUB 6100:GOSUB 6000
3060 IF QT(L)< 1THEN 3100:REM  NO MORE DATA
3065 TC= TC+ SP(L)* QT(L):TC= INT (TC* 100)/ 100
3067 MT= SP(L)* QT(L):GOSUB 200
3070 PRINT "";LTAB( 6)"";QT(L)TAB( 12)"";DE$(L)TAB( 40)"";MT$;
3074 MT= TC:GOSUB 200
3076 PRINT TAB( 52)"";MT$
3080 GOTO 3050
3100 REM  PRINT TOTALS
3110 PRINT "______________________________________________________________"
3120 TD= INT (TC* DC)/ 100
3122 T1= TC- TC* DC/ 100
3123 TA= INT (T1* TX)/ 100
3124 T2= T1+ T1* TX/ 100
3126 T2= INT (T2* 100)/ 100+ SH:MT= TD:GOSUB 200
3128 PRINT "SPECIAL DISCOUNT:";DC;"% = $ "TAB( 27)MT$;TAB( 40)"TAX: ";TX;" % = $";TA
3129 IF SH= 0THEN 3134
3130 MT= SH:GOSUB 200
3132 PRINT "SHIPMENT & HANDLING: "TAB( 27)MT$
3134 MT= T2:GOSUB 200
3135 PRINT "                    -------------------"
3136 PRINT "YOU PAY TOTALLY:     $"TAB( 27)MT$
3137 IF LB> 0THEN MT= LB:GOSUB 200:PRINT "MINUS PMT.RECEIVED:"TAB( 27)MT$
3138 IF LB< 0THEN MT= LB:GOSUB 200:PRINT "PLUS OUTSTANDING:"TAB( 27)MT$
3140 PRINT :PRINT TAB( 5):INPUT "ANY CHANGES? ";AC$
3150 IF LEFT$ (AC$,1)< > "Y"THEN A= 4:GOSUB 6000:RETURN
3160 PLOT 28,11,7
3170 PRINT TAB( 5):INPUT "ENTER LINE # OR 0 FOR NEW DISCOUNT ";L
3175 PLOT 28,11
3180 IF L= 0THEN PRINT TAB( 5):INPUT "ENTER NEW DISCOUNT IN % ";DC
3184 IF L= 0THEN PLOT 28,11:GOTO 3000
3186 PRINT TAB( 5)"PREVIOUS ITEM NUMBER:    ";IN$(L);""
3190 GOTO 770
3990 REM

4000 REM  RETRIEVE PROPOSAL
4001 FILE "T",6400
4002 A= 4:GOSUB 6000
4004 PRINT "NUMBER   NAME OF CUSTOMER              PHONE"
4006 PRINT "RETAIL   DISC.[$]  SHIP[$]   TAX [$]   REC.[$]   BAL. [$]"
4008 PRINT "______________________________________________________________"
4020 FILE "R",1,"COMP",8
4030 LI= 0
4040 LI= LI+ 1:IF LI> 500THEN 4150:REM  >200 FOR COMPUCOLOR
4050 GET 1,LI;NU
4060 IF NU< 1THEN 4140
4070 GET 1,LI;NU,PO$[1],NA$[20],PH$[14],TC,DI,SH,TT,LB,YP
4072 IF PO$= "O"THEN NO= NU
4075 IF PO$= "P"THEN PLOT 31
4080 PRINT "";PO$;"-";NU;TAB( 9)"";NA$TAB( 39)PH$
4090 PRINT "";TCTAB( 8)"";DITAB( 18)"";SHTAB( 28)"";TTTAB( 38)"";LBTAB( 48)"";YP
4095 KO= KO+ TC:DT= DT+ DI:TS= TS+ SH:SR= SR+ TT:BE= BE+ LB:BZ= BZ+ YP:PLOT 15
4100 B= B+ 1:IF B> 10THEN B= 0:A= 7:PRINT "______________________________________________________________":GOSUB 6100:GOSUB 6000
4120 GOTO 4040
4140 PRINT "______________________________________________________________"
4150 PRINT "";KOTAB( 8)"";DTTAB( 18)"";TSTAB( 28)"";SRTAB( 38)"";BETAB( 48)"";BZ:REM  
4160 PRINT "______________________________________________________________"
4170 GOSUB 6100
4180 A= 4:GOSUB 6000
4190 KO= 0:DT= 0:TS= 0:SR= 0:BE= 0:BZ= 0:FILE "C",1
4200 GOTO 610
4490 REM

5000 REM  EPSON PRINTER
5005 GOSUB 6000
5010 PRINT TAB( 10):INPUT "HIT ENTER WHEN PRINTER POWER ON ";EN
5030 REM
5035 GOSUB 6000
5040 L= 0:C= 0:TC= 0
5050 PRINT :PRINT :PRINT :PRINT :PRINT :PRINT TAB( 22)"P R I N T I N G"
5060 POKE 33265,14:OUT 8,199
5062 PLOT 17
5063 PLOT 20,18,27,70,27,72
5064 PLOT 27,69
5065 IF OD$> "!"THEN PRINT OD$;
5066 IF OD$> "!"THEN 5080
5070 PRINT OP$;" #";NO;
5080 PLOT 15
5090 RESTORE 140:READ NN$:NN= LEN (NN$):NN= INT (37- NN/ 2)
5100 PRINT TAB( NN)NN$;
5110 PLOT 20,18
5120 PRINT TAB( 60)"DATE: ";DA$
5130 PLOT 27,69,27,71,14
5135 READ NN$:NN= LEN (NN$):NN= INT (19- NN/ 2)
5140 PRINT TAB( NN)NN$
5150 PLOT 15,14,27,70,27,71
5155 READ NN$:NN= LEN (NN$):NN= INT (32- NN/ 2)
5160 PRINT TAB( NN)NN$
5165 PLOT 15,14,27,71
5168 READ NN$:NN= LEN (NN$):NN= INT (32- NN/ 2)
5170 PRINT TAB( NN)NN$
5180 PLOT 20,27,70,27,71,15
5185 READ NN$:NN= LEN (NN$):NN= INT (62- NN/ 2)
5190 PRINT TAB( NN)NN$
5200 PRINT :PRINT
5210 PLOT 20,15,27,70,27,72
5220 PRINT "TO-"
5225 PLOT 15,14:PRINT TAB( 5)NA$
5227 IF AT$< "!"THEN 5233
5228 PLOT 14:PRINT TAB( 5)AT$
5233 IF NS$< "!"THEN 5237
5235 PLOT 14:PRINT TAB( 5)NS$
5237 IF CS$< "!"THEN 5247
5245 PLOT 14:PRINT TAB( 5)CS$
5247 IF PH$< "!"THEN PRINT :GOTO 5260
5255 PLOT 14:PRINT TAB( 5)PH$
5257 PRINT
5260 PLOT 15,14,27,70,27,71
5270 IF PO$= "P"THEN PRINT "P R O P O S A L   F O R   F O L L O W I N G   I T E M S :"
5280 IF PO$= "O"THEN PRINT TAB( 21)"I N V O I C E   # ";NO
5282 PRINT
5285 FOR X= 1TO J:PLOT 18,20,27,70,27,72:PRINT CO$(X):NEXT X
5287 PLOT 15,14,27,71:PRINT "================================================================="
5289 PRINT :PLOT 20,18:PLOT 27,72,27,69
5290 PRINT "LINE# ITEM#    ITEM DESCRIPTION              QUANTITY   UNIT PRICE  AMOUNT"
5300 PRINT "____________________________________________________________________________"
5310 PRINT
5320 L= L+ 1:C= C+ 1:IF C= 5THEN C= 1:PRINT
5330 IF QT(L)< 1THEN 5400
5340 REM
5350 MT= SP(L):GOSUB 200
5360 PRINT LTAB( 6)IN$(L)TAB( 15)DE$(L)TAB( 47)QT(L)TAB( 50)MT$;
5362 MT= SP(L)* QT(L):GOSUB 200
5364 PRINT TAB( 59)MT$
5370 TC= TC+ SP(L)* QT(L):TC= INT (TC* 100)/ 100
5380 GOTO 5320
5400 PRINT "____________________________________________________________________________"
5410 PRINT
5420 PLOT 20,18,27,70,27,72:PLOT 15,14,27,71
5425 MT= TC:GOSUB 200
5430 PRINT "TOTAL VALUE OF THESE ITEMS:";TAB( 32)"$ ";TAB( 35)MT$
5440 DI= TC* DC/ 100:DI= INT (DI* 100)/ 100
5442 IF DC= 0THEN 5460
5445 PLOT 15,14
5446 EP= TC- DI
5447 MT= - DI:GOSUB 200
5450 PRINT "SPECIAL DISCOUNT :";DC;" %";TAB( 35)MT$
5460 TT= (TC- DI)* TX/ 100:TT= INT (TT* 100)/ 100
5465 IF TX= 0THEN TT= 0:GOTO 5480
5466 PLOT 15,14
5468 MT= TT:GOSUB 200
5470 PRINT "SALES TAX: ";TX;" %";TAB( 35)MT$
5480 IF SH= 0THEN 5485
5482 MT= SH:GOSUB 200
5483 PLOT 15,14
5484 PRINT "SHIPMENT:";TAB( 35)MT$
5485 IF LB= 0THEN 5490
5486 MT= - LB:GOSUB 200
5487 PLOT 15,14:PRINT "PAYMENT RECEIVED: ";TAB( 35)MT$
5490 PLOT 15,14:PRINT TAB( 32)"----------------"
5492 YP= TC- DI+ TT+ SH- LB
5495 PLOT 15,14
5497 MT= YP:GOSUB 200:IF CH$= "Y"THEN PRINT "CHARGED TO YOUR ";CC$;" CARD: ";TAB( 32)"$ ";TAB( 35)MT$:GOTO 5504
5498 IF YP< 0THEN PRINT "CREDIT BALANCE: ";TAB( 32)"$ ";TAB( 35)MT$:GOTO 5502
5499 IF PO$= "P"THEN PRINT "YOUR COST:";TAB( 32)"$ ";TAB( 35)MT$:GOTO 5502
5500 PRINT "PLEASE PAY:";TAB( 32)"$ ";TAB( 35)MT$
5502 PLOT 15,14:PRINT TAB( 32)"================":PRINT
5503 IF DD> 0THEN DK= INT (EP* DD)/ 100:MT= DK:GOSUB 200:PLOT 15,14:PRINT "IF YOU PAY BY ";DD$;" SUBTRACT ";TAB( 32)"$ ";TAB( 35)MT$
5504 IF CH$= "Y"THEN PRINT CC$;" CARD NUMBER: ";CN$:PRINT
5505 PLOT 15,14
5510 PRINT "================================================================="
5515 PRINT
5518 PLOT 15,14
5520 IF PO$= "O"THEN PRINT TAB( 22)"T H A N K     Y O U"
5525 IF PO$= "P"THEN PRINT TAB( 23)"PLEASE LET ME KNOW"
5530 PLOT 12
5540 PLOT 19:WAIT 1,128,128:OUT 8,207:POKE 33265,0
5550 CO= CO- 1:IF CO< 1THEN 1600
5560 PLOT 28,11
5580 GOTO 1000
5590 REM

6000 REM  CLEAR DISPLAY
6010 FOR X= 31TO ASTEP - 1:PLOT 3,0,X,11:NEXT X:RETURN
6090 REM

6100 REM  NEXT DISPLAY
6110 PLOT 3,10,30:INPUT "HIT ENTER TO CONTINUE ";EN
6120 RETURN
6190 REM

6200 REM  CREATE COMP FILE
6210 A= 4:GOSUB 6000
6220 PRINT TAB( 16)"COMP DATA BASE NOT YET CREATED"
6230 PRINT :PRINT TAB( 16):INPUT "HIT ENTER WHEN READY TO DO IT ";EN
6240 FILE "N","COMP",500,64,2:REM  200 ENTRIES FOR COMPUCOLOR
6250 FILE "R",1,"COMP",16
6260 AZ$= " "
6270 FOR X= 1TO 500:REM  200 FOR COMPUCOLOR
6280 PUT 1,X;AZ$[64]
6290 NEXT X
6300 A= 4:GOSUB 6000
6310 LI= 1
6320 GOTO 1800
6390 REM  

6400 REM  WRONG DISK
6410 INPUT "PLEASE INSERT DATA BASE DISK & HIT RETURN ";EN
6420 A= 4:GOSUB 6000
6430 FILE "T",6800
6440 GOTO 4002
6490 REM 

6500 REM  BAUDRATE SELECTION
6510 A= 4:GOSUB 6000
6520 PLOT 3,0,6
6530 PRINT TAB( 15)"ENTER BAUD RATE: "
6540 PRINT :PRINT TAB( 15)"1 -  110"
6550 PRINT TAB( 15)"2 -  150"
6560 PRINT TAB( 15)"3 -  300"
6570 PRINT TAB( 15)"4 - 1200"
6580 PRINT TAB( 15)"5 - 2400"
6590 PRINT TAB( 15)"6 - 4800"
6600 PRINT TAB( 15)"7 - 9600"
6610 PLOT 3,34,6:INPUT "";BA
6620 IF BA< 1OR BA> 7THEN PLOT 7,3,34,6:PRINT "  ":GOTO 6610
6630 PLOT 27,18,BA
6640 GOSUB 6000:RETURN
6690 REM
6700 REM
6710 PRINT LTAB( 6)IN$(L)TAB( 15)DE$(L)TAB( 47)QT(L)TAB( 59)MT$;
6720 MT= SP(L)* QT(L):GOSUB 200:PRINT TAB( 70)MT$:GOTO 1370
6800 REM  DATA DISK NOT GENERATED
6810 A= 4:GOSUB 6000
6820 PRINT TAB( 16)"DATA DISK NOT GENERATED"
6830 PLOT 7
6840 FOR X= 1TO 2000:NEXT X
6850 GOTO 600
6900 REM
6910 FOR X= 1TO J:PRINT CO$(X):NEXT X:RETURN
7000 REM  ADVANCED PAYMENT ROUTINE
7010 PRINT TAB( 5):INPUT "ENTER PMT. DUE DATE     ";DD$
7020 PRINT TAB( 5):INPUT "ENTER DEDUCTION       % ";DD
7030 RETURN
7300 A= 4:GOSUB 6000:PRINT TAB( 12):INPUT "HIT ENTER WHEN READY TO PRINT LABEL ";EN
7310 POKE 33265,14:OUT 8,199
7350 IF PE= 1THEN PRINT NA$:GOTO 7370
7360 PLOT 29,2:PRINT NA$
7370 IF AT$< "!"THEN 7400
7380 IF PE= 1THEN PRINT AT$:GOTO 7400
7390 PLOT 29,2:PRINT AT$
7400 IF NS$< "!"THEN 7430
7410 IF PE= 1THEN PRINT NS$:GOTO 7430
7420 PLOT 29,2:PRINT NS$
7430 IF CS$< "!"THEN 7460
7440 IF PE= 1THEN PRINT CS$:GOTO 7460
7450 PLOT 29,2:PRINT CS$
7460 PRINT :PRINT :PRINT
7470 WAIT 1,128,128
7480 OUT 8,207:POKE 33265,0
7490 RETURN