43 lines
992 B
Plaintext
Executable File
43 lines
992 B
Plaintext
Executable File
*------------------------------------------------------------------
|
|
*PGM NAME: REL8.RESET.INV.AVAIL
|
|
*PURPOSE: TO RESET INV AVAILABLE QTY TO SHELF QTY
|
|
*AUTHOR: BARKSDALE
|
|
*CREATED: 07/20/95
|
|
*------------------------------------------------------------------
|
|
$INCLUDE BP.MASTER GEN.COM2
|
|
$INCLUDE BP.MASTER INV
|
|
*
|
|
OPEN 'INVENTORY' TO INV ELSE ABORT 201,'INVENTORY'
|
|
*
|
|
WHSE="MTEK"
|
|
EOF=0; NUM.READ=0; NUM.DONE=0
|
|
*
|
|
SELECT INV
|
|
LOOP
|
|
READNEXT ID ELSE EOF=1
|
|
UNTIL EOF DO
|
|
IF REM(NUM.READ,100) ELSE GOSUB 2000
|
|
GOSUB 1000
|
|
REPEAT
|
|
GOSUB 2000
|
|
CRT @(0,22):CL:"Press <return> to continue...":
|
|
INPUT ANY
|
|
STOP
|
|
*
|
|
1000 *
|
|
READ IREC FROM INV,ID THEN
|
|
NUM.READ=NUM.READ+1
|
|
LOCATE(WHSE,IREC,INV$WAREHOUSE;FND) THEN
|
|
IREC<INV$QTY.AVAILABLE,FND>=IREC<INV$QTY.INCREASES,FND>-IREC<INV$QTY.REDUCTIONS,FND>
|
|
WRITE IREC ON INV,ID
|
|
NUM.DONE=NUM.DONE+1
|
|
END
|
|
END
|
|
RETURN
|
|
*
|
|
2000 *
|
|
CRT CS
|
|
CRT @(0,5):"NUMBER RECORDS READ: ":NUM.READ
|
|
CRT @(0,6):"NUMBER RECORDS DONE: ":NUM.DONE
|
|
RETURN
|