* ITEM.CMD
* MICHAEL LYNN 8/24/83
STORE ' ' TO h
@ 1, 1  SAY 'IF YOU WOULD LIKE TO BE ABLE TO CHANGE ALL'
@ 2, 1  SAY 'VALUES RATHER THAN JUST VIEW THEM - ENTER Y' GET h PICTURE '!'
READ

IF h ="Y"
STORE 'GET' TO how
STORE 'PICTURE' TO ho
ELSE
STORE 'SAY' TO how
STORE 'USING' TO ho
ENDIF

DO WHILE T
STORE '          ' TO snum
ERASE
@ 1, 1  SAY "ENTER CATALOGUE NUMBER OF ITEM" GET snum PICTURE '!!!!!!!!!!'
@ 2, 1  SAY "ENTER A T TO RETURN TO MENU"
READ
SELECT SECONDARY
FIND &snum
           IF snum = 'T'
           RETURN
           ENDIF
	IF #=0
	@ 3, 1 SAY 'NOT IN DATABASE - RE-ENTER'
        SET CONSOLE OFF
        WAIT
        SET CONSOLE ON
        @ 3, 0 
        LOOP
        ENDIF
           
ERASE
@  4, 1 SAY "-------------------------------------------------"
@  5, 1 SAY "CATALOGUE NUMBER    PRICE"
@  6, 1 &how S.catnum
@  6,20 &how S.price
@  8, 1 SAY "DESCRIPTION OF ITEM"
@  9, 1 &how S.descr
@ 11, 1 SAY "QUANTITY ON HAND"
@ 11,17 &how S.quantity &ho '99'
@ 11,26 SAY "TOTAL SOLD:"
@ 11,37 &how S.sold
@ 13, 1 SAY "RE-ORDER POINT" 
@ 13,15 &how S.reorder &ho '99' 
@ 13,26 SAY "VENDOR NUMBER:"
@ 13,42 &how S.vendor
@ 20, 0 SAY "--------------------------------------------------"
READ
STORE str(ponum,4) to po
SELECT PRIMARY
FIND &po
   IF #=0
   @ 17, 1 SAY "PURCHASE ORDER NOT ON FILE"
   SET CONSOLE OFF
   WAIT
   SET CONSOLE ON
   ELSE
@ 15, 1 SAY 'DATE OF LAST ORDER:'
@ 15,20 SAY podate
@ 15,30 SAY "QUANTITY ORDERED:"
@ 15,47 SAY ordered
@ 17, 1 SAY "PURCHASE ORDER NUMBER:"
@ 17,23 SAY ponum
@ 19, 1 SAY "ORDER RECEIVED?"
@ 19,19 GET recv PICTURE '!'
@ 19,25 SAY "ORDER PAID?"
@ 19,40 GET paid PICTURE '!'
READ
  ENDIF

ENDDO
RELEASE how, h, po, ho
RETURN
