Compucolor.org – Virtual Media

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

2 CLEAR 1000
4 DIM B$(25),E$(15)
5 DIM  N(100),D(100)
6 Z= 1:REM  INITIALPOINTER TO ARRAY
10 PLOT  12,3,0,10
20 PRINT  "STOCK ADJUSTMENT PROGRAM"
30 PRINT  "ENTER PART NUMBER AS 'END' WHEN FINISHED"
40 PRINT  "ANY PART NUMBER ENTERED AS <RETURN> WILL BE IGNORED"
50 FOR  D= 1 TO  3000:NEXT
60 PLOT  12
70 INPUT  "ENTER PART NUMBER FOR ADJUSTMENT  ";N$
72 N(Z)= VAL (N$)
80 IF  N$= "END" THEN  500
90 IF  N$= "" THEN  70
95 PRINT
100 INPUT  "STOCK RECEIVED     UNITS    ";R$
105 R= VAL (R$)
110 INPUT  "STOCK DESPATCHED   UNITS    ";D$
115 D(Z)= R- VAL (D$)
120 PRINT :PRINT
130 Z= Z+ 1:GOTO  70
500 PLOT  12,3,0,10
510 INPUT  "LOAD DISKETTE WITH FILE TO BE ADJUSTED, <RETURN>";Z$
515 PLOT 12
520 FILE "R",1,"INVFIL.RND;01",1
525 GET 1,1;MAX,B$[25],C,D,E$[15],F,G
530 FOR  T= 1 TO  Z- 1
535 FG= 0
540 FOR  R= 2 TO  MAX
545 IF FG= 1THEN 570
550 GET 1,R;A,B$[25],C,D,E$[15],F,G
560 IF N(T)= ATHEN C= C+ D(T):PUT 1,R;A,B$[25],C,D,E$[15],F,G:FG= 1
570 NEXT
573 IF FG= 1THEN 580
575 PRINT "PART NUMBER ";N(T);" NOT FOUND, ADJUST MANUALLY ";D(T)
580 NEXT
585 PRINT :FILE "C",1
590 INPUT  "ADJUSTMENT COMPLETE <RETURN> FOR MENU";Z$
600 LOAD "MENU.BAS":RUN