* SIZES.CMD
SET TALK OFF
ERASE
   ACCEPT "DO YOU WANT TO PRINT THIS FILE? (Y/N)" TO P
   IF P="N" .OR. P="n"
   SET FORMAT TO SCREEN
   ERASE
ELSE
@ 5,5 SAY "GET YOUR PRINTER READY NOW. I'LL WAIT."
WAIT
SET EJECT OFF
SET FORMAT TO PRINT
ENDIF
SET MARGIN TO 0
@  1, 0 SAY CHR(15)+"SIZE SUMMARY"
ACCEPT "ENTER DATE" TO date
@  1,34 SAY date
@  4, 0 SAY "PIECES SOLD:"
@  5, 0 SAY "=================================================="
@  5,50 SAY "="
*ITEMCHANGE (set insert off)
@  6, 0 SAY "SIZE |BLOUSE|DRESS|JACKET|PANTS|SKIRT|SUIT |TOTALS"
@  6,50 SAY "|"
@  7, 0 SAY "=====|======|=====|======|=====|=====|=====|======"
@  7,50 SAY "|"
USE B:SIZEFILE
STORE 8 TO X
STORE 4 TO Y
SELECT SECONDARY
USE B:ITEMS
GOTO TOP
   SELECT PRIMARY
   GOTO TOP
   DO WHILE .NOT. EOF
   STORE SIZE TO SZ
   SELECT SECONDARY
*ITEMCHANGE 
   COUNT FOR SIZE=SZ .AND. SELLPRICE>1 .AND. ITEM='BLOUSE' .AND. RECEIVED>0 TO bl
   COUNT FOR SIZE=SZ .AND. SELLPRICE>1 .AND. ITEM='DRESS' .AND. RECEIVED>0 TO dr
   COUNT FOR SIZE=SZ .AND. SELLPRICE>1 .AND. ITEM='JACKET' .AND. RECEIVED>0 TO ja
   COUNT FOR SIZE=SZ .AND. SELLPRICE>1 .AND. ITEM='PANTS' .AND. RECEIVED>0 TO pa
   COUNT FOR SIZE=SZ .AND. SELLPRICE>1 .AND. ITEM='SKIRT' .AND. RECEIVED>0 TO sk
   COUNT FOR SIZE=SZ .AND. SELLPRICE>1 .AND. ITEM='SUIT' .AND. RECEIVED>0 TO su
   STORE bl+dr+ja+pa+sk+su to tot
   @ X, 2 SAY Y USING '##'
   @ X, 5 SAY "|"
   @ X, 6 SAY bl USING '###'
   @ X,13 SAY dr USING '###'
   @ X,19 SAY ja USING '###'
   @ X,26 SAY pa USING '###'
   @ X,32 SAY sk USING '###'
   @ X,38 SAY su USING '###'
   @ X,44 SAY tot USING '####'
   STORE X+1 TO X
   STORE Y+2 TO Y
   SELECT PRIMARY
   SKIP
   ENDDO
STORE X+2 TO X
@ X,0 SAY "___________________________________________________"
STORE X+1 TO X
@ X,0 SAY "TOTAL"
SELECT SECONDARY
*ITEMCHANGE
COUNT FOR ITEM='BLOUSE' .AND. SELLPRICE>1 .AND. RECEIVED>0 TO blt
COUNT FOR ITEM='DRESS' .AND. SELLPRICE>1 .AND. RECEIVED>0 TO drt
COUNT FOR ITEM='JACKET' .AND. SELLPRICE>1 .AND. RECEIVED>0 TO jat
COUNT FOR ITEM='PANTS' .AND. SELLPRICE>1 .AND. RECEIVED>0 TO pat
COUNT FOR ITEM='SKIRT' .AND. SELLPRICE>1 .AND. RECEIVED>0 TO skt
COUNT FOR ITEM='SUIT' .AND. SELLPRICE>1 .AND. RECEIVED>0 TO sut
@ X,6 SAY blt USING '###'
@ X,13 say drt USING '###'
@ X,19 SAY jat USING '###'
@ X,26 SAY pat USING '###'
@ X,32 SAY skt USING '###'
@ x,38 say sut USING '###'
*
STORE blt+drt+jat+pat+skt+sut to grtot
@ X,44 SAY GRTOT USING '####'
GOTO TOP
SELECT PRIMARY
GOTO TOP
STORE X+1 TO X
@ X,0 SAY CHR(18)+' '
RELEASE ALL
SET FORMAT TO SCREEN
SET PRINT OFF
WAIT
DO B:INVCON
