Listing of file='INV.BAS;01' on disk='vmedia/inventory-sector.ccvf'
2 REM PROGRAMMER: NINA ROVINSKI 3 REM COPYWRITED JUNE10,1980 BY COMPUWORLD 6 PLOT 15:POKE 33289,132 8 TM= 65535- 290 10 BR= INT (TM/ 256):POKE 32941,BR:POKE 32940,TM- BR* 256 12 CLEAR 1500:PLOT 27,4:PRINT "LOAD IO.PRG;1":PLOT 27,27 14 POKE 33283,224:POKE 33284,254 15 ADR= 65446:POKE 33221,201 16 FO= 0:REM NO OPEN FILES 17 GOSUB 6400:PLOT 27,24 20 A$= " " 25 A= 500 30 B1$= " " 35 B2$= " " 40 L$= " " 100 GOSUB 1000 125 GOSUB 1300 150 GOSUB 1600 200 GOSUB 6200 215 GOSUB 1125 225 GOSUB 1315 250 GOSUB 1400:GOSUB 2900 251 HD$= "ITEM NUMBER DESCRIPTION DISTRIBUTOR" 252 UL$= "------------ ----------- -----------" 253 QQ$= "QTY ON HAND QTY ORDERED/COST" 254 QU$= "----------- ----------------" 255 C= 0:DR= 0:IS= 0:RI= 0:OI= 0:DS= 0:RR= 0:IH= 0:TS= 0 260 IN= 0:SC= 0:D= 0:P= 0:NC= 0:AL= 0:PG= 1 275 ON OGOTO 300,350,400,450,500,550,600,650,700,800,850,875 300 GOSUB 2000 305 IF FF= 1GOTO 250 310 GOSUB 1700:GOSUB 2170 315 GOTO 300 350 GOSUB 2400:GOTO 250 400 C= 1 403 GOSUB 2400 405 GOTO 250 450 GOSUB 3200 455 IF D= 1THEN GOSUB 3300 460 IF P= 1THEN GOSUB 4300 465 GOTO 250 500 IS= 1 503 GOSUB 3207:GOSUB 3550 510 GOTO 250 550 RI= 1:T= 0 553 GOSUB 3209 555 IF D= 1THEN GOSUB 3300 560 IF P= 1THEN GOSUB 4400 565 GOTO 250 600 OI= 1:GOSUB 3213 610 IF D= 1THEN GOSUB 3770 612 IF P= 1THEN GOSUB 4200 615 GOTO 250 650 DS= 1:GOSUB 3211 660 GOSUB 3680 670 GOTO 250 700 RR= 1:GOSUB 3215 710 IF D= 1THEN GOSUB 3770 712 IF P= 1THEN GOSUB 4500 715 GOTO 250 800 IH= 1:GOSUB 3216 810 IF D= 1THEN GOSUB 3770 815 IF P= 1THEN GOSUB 4600 820 GOTO 250 850 TS= 1:T7$= " 0.00":T8$= " 0.00" 855 T7= 0:T8= 0:GOSUB 3300 860 GOTO 250 875 PLOT 27,11:GOTO 6600 999 END 1000 REM CRT DEFAULTS 1005 KB= 33278:KF= 33247 1010 CL$= CHR$ (26):REM CURSOR LEFT 1015 EL$= CHR$ (11):REM ERASE LINE 1020 ES$= CHR$ (12):REM ERASE PAGE 1025 EB$= CHR$ (31):REM BLINK 1030 DB$= CHR$ (15):REM DISABLE BLINK 1035 EE$= "":FOR I= 1TO 31:EE$= EE$+ EL$+ CHR$ (10):NEXT I 1040 I1= 40:DH$= "":SP$= "":DX$= "":FOR I= 1TO I1 1045 DH$= DH$+ "_":SP$= SP$+ " ":DX$= DX$+ CL$:NEXT I 1050 RETURN 1052 REM 2ND ENTRY POINT CH=CHARACTER 1055 POKE ADR,1:POKE ADR+ 1,1 1060 H= CALL (0):CH= PEEK (ADR+ 4) 1070 RETURN 1100 REM CURSOR CONTROL 1105 PLOT 3,X,Y:RETURN 1125 REM OPEN FILES 1130 FILE "R",1,DS$+ "PTNO",1 1135 FILE "R",2,DS$+ "MAS",1 1140 FILE "R",3,DS$+ "PTR",1 1145 GET 1,1,1;LA 1150 GET 1,1,5;CT 1152 FO= 1 1155 RETURN 1175 REM CHECK FOR "" OR 0 1180 IF LEN (IV$)= 0GOTO 1195 1185 IF IV$= "0"GOTO 1195 1190 T$= "F":RETURN 1195 T$= "B":RETURN 1200 REM GET DATA LINE RETURN D$,D,DD=LENGTH OF INPUT LIN 1205 D$= "":PRINT LEFT$ (DH$,DL);LEFT$ (DX$,DL); 1210 POKE ADR,DT:POKE ADR+ 1,DL 1215 H= CALL (0):DD= PEEK (ADR+ 2) 1220 D$= "":IF DD= 0THEN 1295 1225 FOR H= 1TO DD:D$= D$+ CHR$ (PEEK (ADR+ 3+ H)):NEXT H 1230 IF DT> 1THEN D= VAL (D$) 1295 RETURN 1300 REM TITLE 1305 PRINT ES$;:X= 20:Y= 0:GOSUB 1100 1310 PLOT 19,14:PRINT "INVENTORY PROGRAM":PLOT 15 1312 RETURN 1315 Y= 0:X= 51:GOSUB 1100:PLOT 20 1318 PRINT "DATE-"; 1320 PLOT 22:PRINT DZ$:RETURN 1330 REM DOL+CENT 1335 NX= D:IF NX= 0OR D$= ""THEN NI$= "0.00":GOTO 1385 1337 IF NX> 9999.99THEN N= - 1:RETURN 1340 NI$= STR$ (NX) 1343 NI= LEN (NI$) 1345 FOR N1= 1TO LEN (NI$):IF MID$ (NI$,N1,1)= "."THEN 1360 1350 NEXT N1:NI$= NI$+ ".00":GOTO 1380 1360 N2= LEN (NI$):IF N1= N2THEN NI$= NI$+ "00":GOTO 1380 1365 IF N1= N2- 1THEN NI$= NI$+ "0":GOTO 1380 1370 IF N1= N2- 2THEN 1380 1380 IF S1= 1AND C= 1GOTO 1382 1381 IF C= 1OR RI= 1OR TS= 1OR DS= 1OR IS= 1OR OI= 1OR RR= 1OR IH= 1THEN RETURN 1382 NI$= LEFT$ (SP$,12)+ NI$:NI$= RIGHT$ (NI$,DL) 1385 D$= NI$:DD= LEN (NI$):D= 0:RETURN 1400 REM OPTIONS 1401 X= 0:Y= 0:GOSUB 1100:PRINT SPC( 20):GOSUB 1100 1402 PLOT 22:PRINT "MODE=";:PLOT 20:PRINT "OPTION " 1403 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,28* 2); 1405 Y= 6:GOSUB 1100:PLOT 22 1410 PRINT " 1 - INSERT AN ITEM" 1415 PRINT " 2 - DELETE AN ITEM" 1420 PRINT " 3 - UPDATE AN ITEM" 1425 PRINT " 4 - DISPLAY OR PRINT ACTIVE ITEMS" 1427 PRINT " 5 - DISPLAY OR PRINT INFORMATION BY ITEM NUMBER PARAMETER" 1430 PRINT " 6 - DISPLAY OR PRINT WHOLESALE INFORMATION" 1435 PRINT " 7 - DISPLAY OR PRINT ALL ITEMS ON ORDER" 1440 PRINT " 8 - DISPLAY OR PRINT ITEMS ON ORDER BY DISTRIBUTOR PARAMETER" 1445 PRINT " 9 - DISPLAY OR PRINT ALL ITEMS REQUIRING REORDER" 1450 PRINT " A - DISPLAY OR PRINT ITEMS WITH A QUANTITY HELD" 1455 PRINT " B - DISPLAY TOTAL STOCK WORTH" 1460 PRINT " C - EXIT" 1465 X= 0:Y= 20:GOSUB 1100:PLOT 18 1466 DT= 1:DL= 1 1470 PRINT "ENTER OPTION DESIRED * _"+ CL$; 1475 PLOT 23:D$= "":GOSUB 1210 1477 O$= D$:PRINT LEFT$ (EE$,4); 1480 IF DD= 0THEN 1465 1485 O= VAL (O$):IF O$> = "A"THEN O= ASC (O$)- 55 1490 IF O> 0AND O< 13THEN RETURN 1495 X= 0:Y= 21:GOSUB 1100:PLOT 17 1497 PRINT EB$+ "INVALID OPTION - TRY AGAIN"+ DB$:GOTO 1465 1499 END 1500 REM PUT 1505 PUT 1,RN,5;ND$(0)[12] 1510 PUT 2,RN;ND$(1)[19],ND$(2)[10],ND$(3)[8],ND$(4)[8] 1515 PUT 2,RN,46;D5,D6,D7,D8,D9,D0,D1 1520 RETURN 1525 REM GET 1530 GET 1,RN,5;ND$(0)[12] 1535 GET 2,RN;ND$(1)[19],ND$(2)[10],ND$(3)[8],ND$(4)[8] 1540 GET 2,RN,46;D5,D6,D7,D8,D9,D0,D1 1545 RETURN 1600 REM INITIALIZE PARM 1605 DIM NN$(11) 1610 DATA "ITEM NUMBER","DESCRIPTION","DISTRIBUTOR","DATE ORDERED" 1615 DATA "DATE RECEIVED","QUANTITY ON HAND","QUANTITY HELD" 1620 DATA "WHOLESALE PRICE","RETAIL PRICE","REORDER LEVEL" 1625 DATA "QUANTITY ON ORDER","CURRENT ORDER PRICE" 1630 FOR I= 0TO 11:READ I$:I$= I$+ "-------------------" 1635 IF I> 6THEN I$= LEFT$ (I$,19):NN$(I)= I$+ " ":GOTO 1650 1640 IF I> 1AND I< 7THEN I$= LEFT$ (I$,16):NN$(I)= I$+ " ":GOTO 1650 1645 I$= LEFT$ (I$,11):NN$(I)= I$+ " " 1650 NEXT I 1655 DIM ND$(11),ND(11,1) 1658 DATA 12,1,19,1,10,1,8,1,8,1,5,2,5,2,7,3,7,3,5,2,5,2,7,3 1660 FOR I= 0TO 11:FOR I1= 0TO 1:READ ND(I,I1):NEXT I1:NEXT I 1670 DIM IL(11,1) 1675 DATA 18,5,18,7,3,10,3,12,3,14,3,16 1680 DATA 3,18,36,10,36,12,36,14,36,16,36,18 1690 FOR I= 0TO 11:FOR I1= 0TO 1:READ IL(I,I1) 1695 NEXT I1:NEXT I 1696 DATA 31,29,31,30,31,30,31,31,30,31,30,31 1697 DIM DF(12):FOR I= 1TO 12:READ DF(I):NEXT I 1699 RETURN 1700 FOR U= 0TO 11:PLOT 20:X= IL(U,0)- 3:Y= IL(U,1) 1705 GOSUB 1100:IF U< 9THEN PRINT U+ 1;")" 1710 IF U> 8THEN X= X+ 1:GOSUB 1100:PRINT CHR$ (56+ U);")" 1715 NEXT U 1740 X= 3:Y= 23:GOSUB 1100:PLOT 19 1745 PRINT "BY THE NUMBER, SELECT DESIRED REVISION (CR TO CONTINUE) * _"+ CL$; 1750 DT= 1:DL= 1:PLOT 23:D$= "":GOSUB 1210 1755 O1$= D$:PRINT LEFT$ (EE$,4); 1760 IF DD= 0THEN RETURN 1765 O1= VAL (O1$):IF O1$> = "A"THEN O1= ASC (O1$)- 55 1770 IF O1> 0AND O1< 13THEN S1= 1:GOTO 1800 1775 X= 18:Y= 24:GOSUB 1100:PLOT 17 1780 PRINT EB$+ "INVALID OPTION - TRY AGAIN"+ DB$:GOTO 1740 1800 U= O1- 1:GOSUB 2850:GOSUB 1100:PLOT 20 1805 PRINT LEFT$ (DH$,ND(U,0)) 1810 GOSUB 2030:GOTO 1740 2000 FF= 0:S1= 0:REM ADD REC 2003 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,28* 2); 2004 PLOT 22:IF IS= 1OR DS= 1THEN PLOT 18 2006 FOR U= 0TO 11:X= IL(U,0):Y= IL(U,1):GOSUB 1100 2010 PRINT NN$(U):NEXT U 2012 IF C= 1OR IS= 1OR DS= 1THEN RETURN 2015 FOR U= 0TO 11:PLOT 20:GOSUB 2850:GOSUB 1100 2020 PRINT LEFT$ (DH$,ND(U,0)):NEXT U 2022 IF LA= 0GOTO 2300 2025 FOR U= 0TO 11 2030 PLOT 19:GOSUB 2850:GOSUB 1100 2031 IF C= 1AND U= 0THEN PLOT 23:PRINT ND$(U):RETURN 2035 IF U= 7OR U= 8OR U= 11THEN PRINT "$":X= X+ 1:GOSUB 1100 2040 DL= ND(U,0):DT= ND(U,1) 2045 GOSUB 1200:IF U= 3OR U= 4THEN DA= 0 2047 IF U= 0THEN IV$= D$:GOSUB 1175 2050 IF T$= "B"AND S1= 1GOTO 2085 2055 IF T$= "B"GOTO 250 2060 IF U= 7OR U= 8OR U= 11THEN N= O:GOSUB 1330 2062 IF N= - 1THEN GOSUB 1100:GOTO 2045 2065 IF U> 4THEN GOSUB 1100:PLOT 23:IF DD< > DLTHEN PRINT RIGHT$ (A$,DL- DD)+ D$:GOTO 2087 2070 IF U> 2AND U< 5THEN DA$= D$:GOSUB 3100 2073 IF U> 2AND U< 5THEN D$= DA$ 2078 IF U> 2AND U< 5AND D$= "D"THEN D$= DZ$ 2080 IF DA= - 1THEN GOSUB 1100:GOTO 2045 2085 GOSUB 1100:PLOT 23:IF DD< > DLTHEN PRINT D$+ LEFT$ (A$,DL- DD) 2087 IF DL= DDTHEN PRINT D$ 2090 IF U= 7OR U= 8OR U= 11THEN GOSUB 2850:GOSUB 1100:PRINT "$" 2095 ND$(U)= D$ 2105 D5= VAL (ND$(5)):D6= VAL (ND$(6)):D7= VAL (ND$(7)) 2110 D8= VAL (ND$(8)):D9= VAL (ND$(9)):D0= VAL (ND$(10)) 2115 D1= VAL (ND$(11)) 2120 IF S1= 1THEN RETURN 2125 NEXT U:RETURN 2130 REM VAL TO STR 2135 ND$(5)= MID$ (STR$ (D5),2):ND$(6)= MID$ (STR$ (D6),2) 2140 NI$= STR$ (D7):GOSUB 1343:ND$(7)= NI$ 2141 ND$(7)= MID$ (ND$(7),2) 2145 NI$= STR$ (D8):GOSUB 1343:ND$(8)= NI$ 2146 ND$(8)= MID$ (ND$(8),2) 2147 IF TS= 1OR RI= 1THEN RETURN 2150 ND$(9)= MID$ (STR$ (D9),2) 2155 ND$(10)= MID$ (STR$ (D0),2) 2160 NI$= STR$ (D1):GOSUB 1343:ND$(11)= NI$ 2161 ND$(11)= MID$ (ND$(11),2) 2165 RETURN 2170 REM DATA BASE ADD 2175 Y= 23:GOSUB 1100:PRINT EL$:X= 12:GOSUB 1100:PLOT 19 2178 PRINT "RECORD BEING PROCESSED; PLEASE STAND BY" 2179 IF C= 1THEN GOSUB 1500:RETURN 2180 RN= LA:GOSUB 1500:OL= LA:TD$= ND$(0) 2182 GET 1,OL;Y:LA= Y:PUT 1,1;LA:FILE "D",1,2,3 2185 L1= LEN (TD$):IF L1< 12THEN TD$= TD$+ LEFT$ (L$,12- L1) 2190 GET 1,1,5;CT:IF CT= 0THEN Z= 1:GOTO 2280 2193 GET 3,CT;B:GET 1,B,5;ND$(0)[12] 2195 IF TD$> ND$(0)THEN Z= CT+ 1:GOTO 2280 2200 BF= 1:EF= CT 2205 OB= BF:BF= (EF+ BF)/ 2:BF= INT (BF) 2210 GET 3,BF;B:GET 1,B,5;ND$(0)[12] 2215 IF TD$= ND$(0)GOTO 2330 2220 IF TD$> ND$(0)AND EF- BF= 0THEN Z= EF+ 1:GOTO 2240 2225 IF TD$< ND$(0)AND EF- BF= 0THEN Z= EF:GOTO 2240 2230 IF TD$> ND$(0)AND EF- BF= 1THEN BF= EF:GOTO 2210 2234 IF TD$> ND$(0)GOTO 2205 2237 EF= BF:BF= OB:GOTO 2205 2240 TB= B:GET 3,Z+ 1;B 2245 IF B= 0THEN PUT 3,Z+ 1;TB:GOTO 2280 2250 L= 1:GET 3,((CT+ 1)- L);B:PUT 3,((CT+ 1)- (L- 1));B 2255 FILE "D",1,2,3 2260 L= L+ 1:GET 3,((CT+ 1)- L);B:PUT 3,((CT+ 1)- (L- 1));B 2265 FILE "D",1,2,3 2270 IF ((CT+ 1)- L)< > ZGOTO 2260 2280 PUT 3,Z;OL:CT= CT+ 1:PUT 1,1,5;CT 2285 FILE "D",1,2,3:RETURN 2300 REM FULL FILE 2305 Y= 23:GOSUB 1100:PRINT EL$:X= 26:GOSUB 1100:PLOT 19 2307 PLOT 17 2310 PRINT EB$+ "FILE IS FULL"+ DB$ 2315 FF= 1:FOR S= 1TO 500:NEXT S:RETURN 2330 REM SAME ITEM 2335 RN= OL:GOSUB 1525 2340 PUT 1,OL,5;B1$[12]:PUT 2,OL;B2$[73] 2343 FILE "D",1,2,3 2345 GET 1,1;LA:PUT 1,OL;LA 2346 LA= OL:PUT 1,1;LA 2347 FILE "D",1,2,3 2350 Y= 23:GOSUB 1100:PRINT EL$:X= 15:GOSUB 1100:PLOT 17 2355 PRINT LEFT$ (TD$,L1)" IS ALREADY ON FILE." 2360 FOR S= 1TO 500:NEXT S:RETURN 2370 REM EMPTY FILE 2375 X= 21:Y= 20:GOSUB 1100:PLOT 20 2380 PRINT EB$+ "NO RECORDS ON FILE"+ DB$ 2385 FOR S= 1TO 500:NEXT S:RETURN 2400 REM DEL+CHNG 2410 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,24* 2) 2420 X= 12:Y= 12:GOSUB 1100 2425 IF C= 1GOTO 2435 2430 PLOT 17:PRINT "ENTER ITEM NUMBER YOU WISH TO DELETE":GOTO 2440 2435 PLOT 19:PRINT "ENTER ITEM NUMBER YOU WISH TO UPDATE" 2440 X= 24:Y= 15:GOSUB 1100 2442 IF DS= 1THEN PRINT LEFT$ (DH$,ND(2,0)):GOTO 2445 2443 PRINT LEFT$ (DH$,ND(0,0)) 2445 IF CT= 0GOTO 2370 2448 IF DS= 1THEN DT= 1:DL= 10:GOTO 2460 2450 DL= 12:DT= 1 2460 GOSUB 1100:GOSUB 1200 2465 IV$= D$:GOSUB 1175 2466 IF T$= "B"THEN RETURN 2468 IF DS= 1THEN GOTO 3705 2470 ND$(0)= D$:L1= LEN (ND$(0)):X1= (12- L1)/ 2:X1= INT (X1) 2475 GOSUB 1100:PRINT L$:X= X+ X1:GOSUB 1100 2477 PLOT 23:PRINT ND$(0) 2479 IF IS= 1GOTO 3575 2480 X= 14:Y= 23:GOSUB 1100:PLOT 20 2485 IF C= 1GOTO 2495 2490 PRINT "PROCEED TO DELETE (Y OR N) * _"+ CL$;:GOTO 2500 2495 PRINT "PROCEED TO UPDATE (Y OR N) * _"+ CL$; 2500 DT= 1:DL= 1:GOSUB 1200:IF D$= "N"GOTO 2400 2510 IF D$= "Y"GOTO 2520 2515 PRINT :GOTO 2480 2520 IF C= 1GOTO 2540 2524 Y= 23:GOSUB 1100:PRINT EL$:X= 14:GOSUB 1100:PLOT 17 2526 PRINT "DELETING RECORD; PLEASE STAND BY":GOTO 2540 2540 GET 1,1,5;CT:TD$= ND$(0) 2542 L1= LEN (TD$):IF IS= 1GOTO 2550 2545 IF L1< 12THEN TD$= TD$+ LEFT$ (L$,12- L1) 2550 BF= 1:EF= CT 2560 OB= BF:BF= (EF+ BF)/ 2:BF= INT (BF) 2565 GET 3,BF;B 2570 IF IS= 1THEN GET 1,B,5;ND$(0)[L1]:GOTO 2585 2575 GET 1,B,5;ND$(0)[12] 2585 IF TD$= ND$(0)GOTO 2650 2590 IF (TD$> ND$(0)OR TD$< ND$(0))AND EF- BF= 0GOTO 2690 2595 IF TD$> ND$(0)AND EF- BF= 1THEN BF= EF:GOTO 2565 2600 IF TD$> ND$(0)GOTO 2560 2605 EF= BF:BF= OB:GOTO 2560 2650 IF IS= 1THEN NO= 1:GOTO 3610 2655 RN= B:GOSUB 1525 2656 IF C= 1GOTO 2687 2660 PUT 1,B,5;B1$[12]:PUT 2,B;B2$[73] 2665 GET 1,1,1;LA:PUT 1,B,1;LA 2667 LA= B:PUT 1,1,1;LA 2670 N= (CT+ 1)- BF 2675 FOR T= 1TO N:GET 3,(BF+ T),1;B 2680 PUT 3,(BF+ (T- 1)),1;B:NEXT T 2684 CT= CT- 1:PUT 1,1,5;CT 2687 FILE "D",1,2,3:IF C= 1GOTO 2700 2689 RETURN 2690 IF IS= 1AND NO= 1GOTO 3960 2691 Y= 23:GOSUB 1100:PRINT EL$:X= 18:GOSUB 1100:PLOT 20 2692 IF DS= 1THEN Y= 23:X= 13:GOSUB 1100:PLOT 20 2693 IF IS= 1THEN PRINT "NO RECORDS FOR THIS PARAMETER":GOTO 2696 2694 IF DS= 1THEN PRINT "NO ORDERED ITEMS FOR THIS PARAMETER":GOTO 2696 2695 PRINT LEFT$ (TD$,L1)" IS NOT ON FILE." 2696 FOR S= 1TO 500:NEXT S:IF IS= 1GOTO 3550 2697 IF DS= 1GOTO 3680 2698 IF C= 1GOTO 2400 2699 RETURN 2700 REM PUT REC UP 2701 GOSUB 2000 2703 GOSUB 2130 2705 FOR U= 0TO 11:DD= LEN (ND$(U)):DL= ND(U,0):PLOT 23 2710 GOSUB 2850:GOSUB 1100 2715 IF U= 7OR U= 8OR U= 11THEN X= X+ 1:GOSUB 1100 2720 IF U> 4AND DD< DLTHEN ND$(U)= RIGHT$ (A$,DL- DD)+ ND$(U):GOTO 2727 2725 IF DD< DLTHEN ND$(U)= ND$(U)+ LEFT$ (A$,DL- DD) 2727 PRINT ND$(U) 2730 IF U= 7OR U= 8OR U= 11THEN GOSUB 2850:GOSUB 1100:PRINT "$" 2740 NEXT U:IF IS= 1OR DS= 1THEN RETURN 2742 GOSUB 1700:GOSUB 2170 2745 GOTO 2400 2850 REM X,Y,INPUT POINTS 2855 Y= IL(U,1) 2860 IF U> 6THEN X= IL(U,0)+ 20 2865 IF U> 1AND U< 7THEN X= IL(U,0)+ 17 2870 IF U= 0OR U= 1THEN X= IL(U,0)+ 12 2875 RETURN 2900 REM DISPLAY MODE 2902 X= 0:Y= 0:GOSUB 1100:PRINT SPC( 20):GOSUB 1100 2906 PLOT 22:PRINT "MODE=";:PLOT 20 2907 IF O> 6THEN 2911 2910 ON OGOTO 2915,2918,2921,2924,2928,2930 2911 ON O- 6GOTO 2933,2933,2936,2940,2945,2950 2915 PRINT "INSERT":GOTO 2960 2918 PRINT "DELETE":GOTO 2960 2921 PRINT "UPDATE":GOTO 2960 2924 PRINT "ACTIVE ITEMS":GOTO 2960 2928 PRINT "DISPLAY":GOTO 2960 2930 PRINT "RETAIL DATA":GOTO 2960 2933 PRINT "ORDERED ITEMS":GOTO 2960 2936 PRINT "REORDER":GOTO 2960 2940 PRINT "QUANTITY HELD":GOTO 2960 2945 PRINT "STOCK WORTH":GOTO 2960 2950 PRINT "EXIT" 2960 PLOT 18:RETURN 3100 REM CHECK DATE DA$ DA=-1=ERROR 3102 GOSUB 5400:IF DA$= DZ$THEN DD= DL:DA= 0:RETURN 3103 IF DA$= ""THEN DA= 0:RETURN 3105 I1= LEN (DA$):IF I1< 6THEN DA= - 1:RETURN 3110 IF MID$ (DA$,2,1)= "/"THEN I2= 2:GOTO 3130 3115 IF MID$ (DA$,3,1)= "/"THEN I2= 3:GOTO 3130 3120 DA= - 1:RETURN 3130 I$= LEFT$ (DA$,I2- 1):IF I2= 2THEN I$= "0"+ I$ 3135 I= VAL (I$):IF I< 1OR I> 12THEN DA= - 1:RETURN 3140 I$= I$+ "/":DA$= MID$ (DA$,I2+ 1) 3145 IF MID$ (DA$,2,1)= "/"THEN I2= 2:GOTO 3165 3150 IF MID$ (DA$,3,1)= "/"THEN I2= 3:GOTO 3165 3155 DA= - 1:RETURN 3165 I1$= LEFT$ (DA$,I2- 1) 3170 IF I2= 2THEN I1$= "0"+ I1$ 3175 I3= VAL (I1$):IF I3> DF(1)THEN DA= - 1:RETURN 3180 I$= I$+ I1$+ "/":DA$= MID$ (DA$,I2+ 1) 3185 I= VAL (DA$):IF I< 60OR I> 99THEN DA= - 1:RETURN 3190 DA$= I$+ DA$:DA= 0:RETURN 3200 REM DSPLY OR PRNT 3203 Y= 9:GOTO 3225 3205 Y= 11:GOTO 3225 3207 Y= 10:GOTO 3225 3209 Y= 11:GOTO 3225 3211 Y= 13:GOTO 3225 3213 Y= 12:GOTO 3225 3215 Y= 14:GOTO 3225 3216 Y= 15:GOTO 3225 3225 X= 5:GOSUB 1100:PLOT 19 3230 PRINT EB$+ "D":PLOT 22:X= 6:GOSUB 1100:PRINT EB$+ "ISPLAY" 3233 X= 13:GOSUB 1100:PRINT EB$+ "OR" 3235 X= 16:PLOT 19:GOSUB 1100:PRINT EB$+ "P" 3237 X= 17:PLOT 22:GOSUB 1100:PRINT EB$+ "RINT"+ DB$ 3240 X= 0:Y= 20:GOSUB 1100:PLOT 18 3242 PRINT "ENTER OPTION DESIRED * _"+ CL$; 3245 DT= 1:DL= 1:GOSUB 1200 3255 IF D$= "D"THEN D= 1:RETURN 3260 IF D$= "P"THEN P= 1:RETURN 3265 GOTO 3235 3300 REM DISPLAY 3305 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,28* 2); 3310 X= 0:Y= 4:GOSUB 1100:PLOT 19 3315 PRINT "ITEM NUMBER DESCRIPTION DISTRIBUTOR" 3320 X= 0:Y= 5:GOSUB 1100:PLOT 20 3325 PRINT "------------ ------------------- -----------" 3327 IF RI= 1GOTO 3390 3328 IF TS= 1GOTO 3450 3329 IF OI= 1GOTO 3770 3330 PLOT 23:Y1= 7 3333 IF IN= 1GOTO 3375 3335 FOR Z= 1TO A:GET 3,Z;B 3336 PLOT 23 3340 IF B= 0GOTO 3950 3345 RN= B:GOSUB 1525 3350 X= 0:Y= Y1:GOSUB 1100:PRINT ND$(0) 3355 X= 13:GOSUB 1100:PRINT ND$(1) 3360 X= 33:GOSUB 1100:PRINT ND$(2) 3362 IF RI= 1GOTO 3410 3363 IF TS= 1GOTO 3490 3365 Y1= Y1+ 1:SC= SC+ 1 3370 IF SC/ 20= INT (SC/ 20)THEN IN= 1:GOTO 3900 3375 NEXT Z 3390 REM RET DATA 3395 X= 45:Y= 4:GOSUB 1100:PLOT 19:PRINT " QTY/HAND RETAIL" 3400 Y= 5:GOSUB 1100:PLOT 20:PRINT "---------- --------" 3405 GOTO 3330 3410 ND$(5)= MID$ (STR$ (D5),2):QA= LEN (ND$(5)) 3415 X= 47:GOSUB 1100 3417 IF QA= 5THEN PRINT ND$(5):GOTO 3420 3418 PRINT RIGHT$ (A$,(5- QA))+ ND$(5) 3420 NI$= STR$ (D8):GOSUB 1343:ND$(8)= NI$ 3423 ND$(8)= MID$ (ND$(8),2):RE= LEN (ND$(8)) 3425 X= 56:GOSUB 1100:PRINT "$" 3430 X= 57:GOSUB 1100 3435 IF RE= 7THEN PRINT ND$(8):GOTO 3445 3440 PRINT RIGHT$ (A$,(7- RE))+ ND$(8) 3445 GOTO 3365 3450 REM TOTAL STOCK 3455 X= 45:Y= 4:GOSUB 1100:PLOT 19 3460 PRINT "WHOLESALE RETAIL" 3465 Y= 5:GOSUB 1100:PLOT 20:PRINT "--------- --------" 3470 X= 6:Y= 2:GOSUB 1100:PLOT 18 3475 PRINT "WHOLESALE TOTAL:" 3480 X= 36:GOSUB 1100:PRINT "RETAIL TOTAL:" 3481 X= 24:Y= 2:GOSUB 1100:PRINT T7$:X= 51:GOSUB 1100:PRINT T8$ 3485 GOTO 3330 3490 TQ= D5+ D6:M7= D7* TQ:M8= D8* TQ:T7= T7+ M7:T8= T8+ M8 3492 IF M7> 999999THEN X= 45:GOSUB 3549:GOTO 3512 3495 D7= M7:D8= M8:GOSUB 2140 3500 M7$= ND$(7):M8$= ND$(8):WH= LEN (M7$):RE= LEN (M8$) 3505 X= 45:GOSUB 1100:IF WH= 9THEN PRINT M7$:GOTO 3515 3510 PRINT RIGHT$ (A$,9- WH)+ M7$ 3512 IF M8> 999999THEN X= 55:GOSUB 3549:GOTO 3525 3513 PLOT 23 3515 X= 55:GOSUB 1100:IF RE= 9THEN PRINT M8$:GOTO 3525 3520 PRINT RIGHT$ (A$,9- RE)+ M8$ 3525 D7= T7:D8= T8:GOSUB 2140:T7$= ND$(7):T8$= ND$(8) 3527 X= 23:Y= 2:GOSUB 1100:PLOT 18:PRINT "$" 3530 X= 50:GOSUB 1100:PRINT "$" 3533 X= 24:Y= 2:IF T7> 999999THEN GOSUB 3549:GOTO 3537 3535 GOSUB 1100:PLOT 18:PRINT T7$ 3537 X= 51:IF T8> 999999THEN GOSUB 3549:GOTO 3545 3540 GOSUB 1100:PLOT 18:PRINT T8$ 3545 GOTO 3365 3549 GOSUB 1100:PLOT 17:PRINT "999999.00":RETURN 3550 NO= 0:REM NO. SEARCH 3555 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,25* 2) 3560 X= 13:Y= 12:GOSUB 1100:PLOT 21 3565 PRINT "ENTER ITEM NUMBER PARAMETER (* FOR ALL)" 3570 GOTO 2440 3575 X= 14:Y= 23:GOSUB 1100:PLOT 20 3580 PRINT "DO YOU WISH TO PROCEED (Y OR N)? _"+ CL$; 3585 DT= 1:DL= 1:GOSUB 1200:IF D$= "N"GOTO 3555 3587 IF D$= "Y"AND P= 1GOTO 4000 3590 IF D$= "Y"GOTO 3600 3595 PRINT :GOTO 3575 3600 GOSUB 2000 3601 IF ND$(0)= "*"GOTO 3655 3605 GOTO 2540 3610 N= 1 3615 IF BF- N= 0GOTO 3625 3617 GET 3,(BF- N);B:GET 1,B,5;ND$(0)[L1] 3620 IF TD$= ND$(0)THEN N= N+ 1:GOTO 3615 3625 BF= (BF- N)+ 1:GET 3,BF;B:RN= B:GOSUB 1525:GOSUB 2130 3626 N= 1:IF P= 1GOTO 4015 3627 GOSUB 2705:N= 1:GOTO 3900 3630 GET 3,BF+ N;B:GET 1,B,5;ND$(0)[L1] 3635 IF B= 0GOTO 3950 3640 IF TD$= ND$(0)GOTO 3660 3645 GOTO 3950 3655 FOR Z= 1TO A:GET 3,Z;B:IF B= 0GOTO 3950 3660 RN= B:GOSUB 1525:GOSUB 2130 3663 IF P= 1THEN N= N+ 1:GOTO 4033 3665 GOSUB 2705:N= N+ 1:GOTO 3900 3670 NEXT Z 3680 NO= 0:REM DIST. SEARCH 3685 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,25* 2) 3690 X= 16:Y= 12:GOSUB 1100:PLOT 21 3695 PRINT "ENTER DISTRIBUTOR PARAMETER" 3700 GOTO 2440 3705 ND$(2)= D$:L2= LEN (ND$(2)):X2= (10- L2)/ 2:X2= INT (X2) 3710 GOSUB 1100:PRINT L$:X= X+ X2:GOSUB 1100:PLOT 23 3715 PRINT ND$(2) 3718 X= 14:Y= 23:GOSUB 1100:PLOT 20 3720 PRINT "DO YOU WISH TO PROCEED (Y OR N)? _"+ CL$; 3725 DT= 1:DL= 1:GOSUB 1200:IF D$= "N"GOTO 3685 3727 IF D$= "Y"AND P= 1GOTO 3735 3730 IF D$= "Y"GOTO 3734 3733 PRINT :GOTO 3718 3734 GOSUB 2000 3735 DI$= ND$(2):FOR Z= 1TO A:GET 3,Z;B 3740 IF B= 0AND NO= 0GOTO 2692 3743 IF B= 0GOTO 3950 3745 GET 2,B,20;ND$(2)[L2]:IF DI$= ND$(2)GOTO 3755 3750 NEXT Z 3755 GET 2,B,66;D0:IF D0= 0GOTO 3750 3757 NO= 1:RN= B:GOSUB 1525:GOSUB 2130 3758 IF P= 1AND NC= 1GOTO 4145 3759 IF P= 1GOTO 4100 3760 GOSUB 2705:GOTO 3900 3770 IN= 0:SC= 0:REM ORD,REORD,HELD 3773 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,25* 2) 3775 X= 0:Y= 5:GOSUB 1100:PLOT 19 3777 PRINT "ITEM NUMBER DESCRIPTION DISTRIBUTOR" 3779 Y= 6:GOSUB 1100:PLOT 20:PRINT "------------ ----------- -----------" 3780 IF OI= 1GOTO 3800 3782 IF RR= 1GOTO 3835 3783 IF IH= 1GOTO 3865 3785 PLOT 23:Y1= 8:IF IN= 1GOTO 3799 3786 FOR Z= 1TO A:GET 3,Z;B:IF B= 0GOTO 3950 3787 IF IH= 1GOTO 3876 3788 IF OI= 1GOTO 3808 3789 IF RR= 1GOTO 3848 3790 PLOT 23:RN= B:GOSUB 1525 3791 X= 0:Y= Y1:GOSUB 1100:PRINT ND$(0):X= 13:GOSUB 1100 3793 PRINT LEFT$ (ND$(1),11):X= 25:GOSUB 1100:PRINT ND$(2) 3794 IF OI= 1GOTO 3810 3795 IF RR= 1GOTO 3850 3796 IF IH= 1GOTO 3878 3797 Y1= Y1+ 1:SC= SC+ 1 3798 IF SC/ 19= INT (SC/ 19)THEN IN= 1:IF IN= 1THEN DR= 1:GOTO 3900 3799 NEXT Z 3800 REM ORDERED ITEMS 3802 X= 37:Y= 5:GOSUB 1100:PLOT 19:PRINT "DATE ORDERED QTY/PRICE" 3805 Y= 6:GOSUB 1100:PLOT 20:PRINT "------------ -------------" 3807 GOTO 3785 3808 GET 2,B,66;D(0):IF D(0)> 0GOTO 3790 3809 GOTO 3799 3810 X= 39:GOSUB 1100:PRINT ND$(3) 3813 ND$(10)= MID$ (STR$ (D0),2):QO= LEN (ND$(10)) 3815 X= 50:GOSUB 1100 3818 IF QO= 5THEN PRINT ND$(10):GOTO 3822 3820 PRINT RIGHT$ (A$,(5- QO))+ ND$(10) 3822 X= 55:GOSUB 1100:PLOT 22:PRINT "@" 3825 NI$= STR$ (D1):GOSUB 1343:ND$(11)= NI$ 3827 ND$(11)= MID$ (ND$(11),2):CP= LEN (ND$(11)) 3828 PLOT 23 3829 X= 56:GOSUB 1100:IF CP= 7THEN PRINT ND$(11):GOTO 3833 3831 PRINT RIGHT$ (A$,(7- CP))+ ND$(11) 3833 GOTO 3797 3835 REM REQU REORD 3837 X= 37:Y= 4:GOSUB 1100:PLOT 19 3840 PRINT "REORD QTY ON QTY ON CURRENT" 3842 Y= 5:GOSUB 1100:PRINT "LEVEL HAND ORDER PRICE" 3844 Y= 6:GOSUB 1100:PLOT 20 3845 PRINT "----- ------ ------ -------" 3847 GOTO 3785 3848 GET 2,B,46;D5:GET 2,B,62;D9,D0:IF D5+ D0< = D9GOTO 3790 3849 GOTO 3799 3850 ND$(9)= MID$ (STR$ (D9),2):RL= LEN (ND$(9)) 3852 X= 37:GOSUB 1100:IF RL= 5THEN PRINT ND$(9):GOTO 3856 3854 PRINT RIGHT$ (A$,(5- RL))+ ND$(9) 3856 ND$(5)= MID$ (STR$ (D5),2):QA= LEN (ND$(5)) 3858 X= 44:GOSUB 1100:IF QA= 5THEN PRINT ND$(5):GOTO 3862 3860 PRINT RIGHT$ (A$,(5- QA))+ ND$(5) 3862 GOTO 3813 3865 REM ITEMS HELD 3867 X= 37:Y= 4:GOSUB 1100:PLOT 19 3870 PRINT "QTY QTY ON QTY ON CURRENT 3873 Y= 5:GOSUB 1100:PRINT "HELD HAND ORDER PRICE" 3875 X= 37:Y= 6:GOSUB 1100:PLOT 20:GOTO 3845 3876 GET 2,B,50;D6:IF D6> 0GOTO 3790 3877 IF D6< = 0GOTO 3799 3878 ND$(6)= MID$ (STR$ (D6),2):QE= LEN (ND$(6)) 3880 X= 37:GOSUB 1100 3883 IF QE= 5THEN PRINT ND$(6):GOTO 3887 3885 PRINT RIGHT$ (A$,(5- QE))+ ND$(6) 3887 GOTO 3856 3900 REM CONT Y OR N 3905 X= 14:Y= 29:GOSUB 1100:PLOT 18 3906 IF IS= 1THEN PLOT 19 3910 PRINT "DO YOU WANT TO CONTINUE (Y OR N) * _"+ CL$; 3915 DT= 1:DL= 1:GOSUB 1200 3917 Y= 29:GOSUB 1100:PRINT EL$ 3918 IF D$= "N"AND DS= 1GOTO 3680 3919 IF D$= "N"AND IS= 1GOTO 3550 3920 IF D$= "N"THEN RETURN 3921 IF D$= "Y"AND DS= 1GOTO 3750 3922 IF D$= "Y"AND IS= 1AND NO= 1GOTO 3630 3923 IF D$= "Y"AND IS= 1GOTO 3670 3924 IF D$= "Y"AND DR= 1GOTO 3773 3925 IF D$= "Y"GOTO 3305 3930 PRINT :GOTO 3900 3950 REM END OF LIST 3951 IF P= 1GOTO 4080 3952 Y= 29:PRINT EL$ 3955 X= 13:Y= 29:GOSUB 1100:PLOT 18 3956 IF IS= 1OR DS= 1THEN PLOT 19 3960 PRINT "END OF LIST - HIT RETURN TO CONTINUE * _"+ CL$; 3963 DT= 1:GOSUB 1200 3965 Y= 29:GOSUB 1100:PRINT EL$ 3966 IF IS= 1AND DD= 0GOTO 3550 3967 IF DS= 1AND DD= 0GOTO 3680 3970 IF DD= 0THEN RETURN 3975 PRINT :GOTO 3950 4000 REM ITEM NO. SEARCH 4005 IF ND$(0)= "*"THEN AL= 1:GOTO 4015 4010 GOTO 2540 4015 GOSUB 4990 4020 PRINT SPC( 29);"REPORT BY ITEM NUMBER" 4021 IF IN= 1THEN PG= PG+ 1 4022 GOSUB 4980:PRINT :PRINT : 4023 PRINT "ITEM NUMBER DESCRIPTION DATE ORDERED QTY/HAND RETAIL REORDER QTY ON ORDER" 4025 PRINT " DISTRIBUTOR DATE RECEIVED QTY/HELD WHOLESALE LEVEL COST" 4030 PRINT "------------ ----------- ------------- -------- --------- ------- -------------" 4031 IF AL= 1GOTO 4050 4032 IF IN= 1GOTO 3630 4033 PRINT 4035 GOSUB 4900 4040 PRINT ND$(0)" "ND$(1)" "ND$(3)" "ND$(5)" "ND$(8)" "ND$(9)" "ND$(10)" @" 4045 PRINT SPC( 13);ND$(2)" "ND$(4)" "ND$(6)" "ND$(7);SPC( 12);ND$(11) 4049 GOTO 4070 4050 REM ALL 4053 IF IN= 1GOTO 4079 4055 FOR Z= 1TO A:GET 3,Z;B:IF B= 0GOTO 4080 4060 RN= B:GOSUB 1525:GOSUB 2130 4065 GOTO 4033 4070 SC= SC+ 1 4075 IF SC/ 15= INT (SC/ 15)THEN IN= 1:PRINT CHR$ (12):GOTO 4020 4076 IF AL= 1GOTO 4079 4077 GOTO 3630 4079 NEXT Z 4080 IF RI= 1THEN FOR Z1= 1TO 54:PRINT "*";:NEXT Z1:PRINT "*":PRINT "TOTAL";SPC( 43);T 4090 PRINT CHR$ (12):POKE 33265,0:PLOT 3,18,7:PRINT DB$:RETURN 4100 REM DIST SEARCH 4105 NC= 1 4107 GOSUB 4990 4115 PRINT SPC( 24);"ITEMS ON ORDER BY DISTRIBUTOR" 4120 IF IN= 1THEN PG= PG+ 1 4125 GOSUB 4980:PRINT :PRINT 4135 PRINT HD$;" DATE ORDERED QTY ORDERED COST" 4140 PRINT UL$;" ------------ ----------- -------" 4141 IF OI= 1AND IN= 1GOTO 4250 4142 IF OI= 1GOTO 4220 4143 IF IN= 1GOTO 3750 4145 GOSUB 4900 4150 PRINT ND$(0)" "ND$(1)" "ND$(2)" "ND$(3)" "ND$(10)" @ "ND$(11) 4152 IF OI= 1GOTO 4235 4155 SC= SC+ 1 4160 IF SC/ 48= INT (SC/ 48)THEN IN= 1:PRINT CHR$ (12):GOTO 4115 4165 GOTO 3750 4200 REM REPORT OI 4205 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,25* 2) 4210 GOSUB 4990 4215 PRINT SPC( 31);"ITEMS ON ORDER" 4217 GOTO 4120 4220 FOR Z= 1TO A:GET 3,Z;B:IF B= 0GOTO 4080 4225 GET 2,B,66;D(0):IF D(0)> 0GOTO 4255 4235 SC= SC+ 1 4240 IF SC/ 48= INT (SC/ 48)THEN IN= 1:PRINT CHR$ (12):GOTO 4215 4250 NEXT Z 4255 RN= B:GOSUB 1525:GOSUB 2130 4260 GOTO 4145 4300 REM ACTIVE 4305 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,25* 2) 4310 GOSUB 4990 4314 IF IH= 1GOTO 4615 4315 IF RI= 1GOTO 4415 4316 IF RR= 1GOTO 4515 4317 PRINT SPC( 33);"ACTIVE ITEMS" 4320 IF IN= 1THEN PG= PG+ 1 4325 GOSUB 4980:PRINT :PRINT 4330 PRINT HD$:PRINT UL$ 4333 IF IN= 1GOTO 4365 4335 FOR Z= 1TO A:GET 3,Z;B:IF B= 0GOTO 4080 4337 IF RR= 1GOTO 4535 4339 IF IH= 1GOTO 4635 4340 RN= B:GOSUB 1525 4342 IF RI= 1GOTO 4435 4345 NU= LEN (ND$(0)):ND$(1)= LEFT$ (ND$(1),11) 4350 PRINT ND$(0);SPC( 13- NU);ND$(1);" "ND$(2) 4355 SC= SC+ 1 4360 IF SC/ 48= INT (SC/ 48)THEN IN= 1:PRINT CHR$ (12):GOTO 4314 4365 NEXT Z 4400 REM WHLSLE 4402 HD$= HD$+ " QTY ON HAND WHLSLE" 4403 UL$= UL$+ " ----------- -------" 4405 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,25* 2) 4410 GOSUB 4990 4415 PRINT SPC( 29);"WHOLESALE INFORMATION" 4430 GOTO 4320 4435 GOSUB 2130:GOSUB 4900 4440 PRINT ND$(0)" "ND$(1)" "ND$(2)" "ND$(5)" "ND$(7) 4442 T= T+ (VAL (ND$(5))* VAL (ND$(7))) 4445 GOTO 4355 4500 REM REQUIR REORD 4502 HD$= HD$+ " REORDER LEVEL "+ QQ$ 4503 UL$= UL$+ " ------------- "+ QU$ 4505 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,25* 2) 4510 GOSUB 4990 4515 PRINT SPC( 27);"ITEMS REQUIRING REORDER" 4530 GOTO 4320 4535 GET 2,B,46;D5:GET 2,B,62;D9,D0:IF D5+ D0> D9GOTO 4365 4540 RN= B:GOSUB 1525:GOSUB 2130:GOSUB 4900 4545 PRINT ND$(0)" "ND$(1)" "ND$(2)" "ND$(9);SPC( 8);ND$(5)" "ND$(10)" @ "ND$(11) 4550 GOTO 4355 4600 REM QTY HELD 4602 HD$= HD$+ " QTY ON HOLD "+ QQ$ 4603 UL$= UL$+ " ----------- "+ QU$ 4605 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,25* 2) 4610 GOSUB 4990 4615 PRINT SPC( 26);"ITEMS WITH A QUANTITY HELD" 4630 GOTO 4320 4635 GET 2,B,50;D6:IF D6< = 0GOTO 4365 4640 RN= B:GOSUB 1525:GOSUB 2130:GOSUB 4900 4645 PRINT ND$(0)" "ND$(1)" "ND$(2)" "ND$(6)" "ND$(5)" "ND$(10)" @ "ND$(11) 4650 GOTO 4355 4900 REM LENGTH 4905 NU= LEN (ND$(0)):DI= LEN (ND$(2)):QA= LEN (ND$(5)) 4910 QE= LEN (ND$(6)):RL= LEN (ND$(8)):WL= LEN (ND$(7)) 4915 RE= LEN (ND$(9)):QO= LEN (ND$(10)):CO= LEN (ND$(11)) 4917 ND$(1)= LEFT$ (ND$(1),11) 4920 IF NU< 12THEN ND$(0)= ND$(0)+ LEFT$ (A$,12- NU) 4925 IF DI< 10THEN ND$(2)= ND$(2)+ LEFT$ (A$,12- DI) 4930 IF QA< 5THEN ND$(5)= RIGHT$ (A$,5- QA)+ ND$(5) 4935 IF QE< 5THEN ND$(6)= RIGHT$ (A$,5- QE)+ ND$(6) 4940 IF RL< 7THEN ND$(8)= RIGHT$ (A$,7- RL)+ ND$(8) 4945 IF WL< 7THEN ND$(7)= RIGHT$ (A$,7- WL)+ ND$(7) 4950 IF RE< 5THEN ND$(9)= RIGHT$ (A$,5- RE)+ ND$(9) 4955 IF QO< 5THEN ND$(10)= RIGHT$ (A$,5- QO)+ ND$(10) 4960 IF CO< 7THEN ND$(11)= RIGHT$ (A$,7- CO)+ ND$(11) 4965 RETURN 4980 REM TITLE 4982 PRINT DZ$;SPC( 10);"******************************************";SPC( 10);"PAGE "PG 4984 RETURN 4990 REM WORK + PRNTR ON 4991 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,25* 2) 4992 X= 26:Y= 15:GOSUB 1100:PLOT 20 4994 PRINT EB$+ "WORKING" 4996 PLOT 27,18,C3:PLOT 27,13:PRINT :RETURN 5400 REM CONVERTS TODAYS DATE IF NEEDED 5405 IF DA$= "D"THEN DA$= DZ$:RETURN 5410 RETURN 6200 REM GET TODAYS DATE 6205 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,54) 6207 Y= 5:GOSUB 1100:PLOT 18:PRINT "ENTER TODAYS DATE ";:PLOT 22 6208 PRINT "__/__/__";:FOR I= 1TO 8:PRINT CL$;:NEXT I 6209 D$= "" 6210 DT= 1:DL= 8:GOSUB 1210:PRINT LEFT$ (EE$,6):IF DD= 0THEN 6207 6215 DA$= D$:GOSUB 3105:IF DA< > - 1THEN DZ$= DA$:RETURN 6220 Y= Y+ 1:GOSUB 1100:PLOT 17 6225 PRINT EB$+ "INVALID OPTION - PLEASE TRY AGAIN!"+ DB$ 6230 GOTO 6207 6400 REM GET CONFIG FILE 6405 E= 0 6410 FILE "T",6450 6415 FILE "R",1,"CONFIG.DAT",1 6420 GET 1,1;C1,C2,C3 6425 FILE "C",1:DS$= "":IF C1= 1THEN DS$= "CD1:" 6430 LC= C2:POKE ADR+ 3,LC 6431 IF C1= 1THEN RETURN 6432 PLOT 12:PLOT 6,3:PLOT 3,12,0 6433 PRINT "COMPUWORLD INC. - INVENTORY PROGRAM" 6434 PRINT "----------------------------------------------------------------" 6435 X= 0:Y= 5:GOSUB 6500:PLOT 19 6440 PRINT "REMOVE PROGRAM DISK AND INSERT DATA DISK,THEN PRESS (CR) KEY"; 6445 GOSUB 6520:RETURN 6450 FILE "T":X= 0:Y= 5:GOSUB 6500:PLOT 17,32 6455 PRINT "MISSING SYSTEM CONFIGURATION DATA FILES! - GO BACK TO MENU" 6460 PLOT 15,18:END 6500 REM FREDS CURS CONT 6510 PLOT 3,X,Y:RETURN 6520 REM SEC ENTRY PNT 6525 KB= 33278:KF= 33247 6530 POKE KF,31:POKE KB,0 6535 CH= PEEK (KB):IF CH= 0THEN 6535 6540 IF CH= 26OR CH= 13THEN RETURN 6545 IF CH< 32THEN 6530 6550 IF CH< 97THEN RETURN 6555 IF LC= 0THEN 6530 6560 CH= CH- 32:GOTO 6540 6565 RETURN 6600 REM BACK TO MENU 6602 FILE "T",6300 6605 IF FO= 1THEN PUT 1,1,5;CT:FILE "C",1,2,3 6610 IF LEN (DS$)= 0THEN 6630 6620 LOAD "MENU":RUN 6630 X= 0:Y= 5:GOSUB 6500:PRINT LEFT$ (EE$,56) 6635 PLOT 19:Y= 5:GOSUB 6500 6636 PLOT 12:PLOT 3,12,0:PLOT 6,3 6637 PRINT "COMPUWORLD INC. - INVENTORY PROGRAM" 6638 PRINT "----------------------------------------------------------------" 6640 PRINT "REMOVE DATA DISK AND INSERT PROGRAM DISK, THEN PRESS (CR) KEY"; 6645 GOSUB 6520:GOTO 6620 6699 END 7000 REM CLOSE FILES 7005 PUT 1,1,5;CT 7010 FILE "C",1,2,3 7015 GOTO 215