REPORTFORM;IVC7_E.frf
TITLE;Lot FIFO Report By Location
SQL;SELECT DATEDOC,DOCNO,INVCARD.ID, INVMST.UNIT,LOCA.LOCDESC,
SQL;INVMST.XDESC, MQUAN, QTYCUT,  INVCARD.LOCID, COSTREPBAL, IF(MQUAN=0,1,COSTREPBAL/MQUAN) AS XCOST
SQL;FROM INVCARD LEFT JOIN INVMST ON INVCARD.ID = INVMST.ID
SQL;LEFT JOIN LOCA ON INVCARD.LOCID = LOCA.LOCID
SQL;WHERE ( TRTYPE = '01' OR TRTYPE = '00')
SQL;ORDER BY INVCARD.LOCID,ID,  DATEDOC, DOCNO
CONDITION;From ID~INVCARD.ID~Chr~2~SELECT ID FROM INVMST~INV
CONDITION;From Date~INVCARD.DATEDOC~Date~2~~
CONDITION;From Location~INVCARD.LOCID~Chr~2~SELECT LOCID FROM LOCA~LOC
EXCELSQL;SELECT DATEDOC,DOCNO,INVCARD.ID, INVMST.UNIT,LOCA.LOCDESC,
EXCELSQL;INVMST.XDESC, MQUAN, QTYCUT,  INVCARD.LOCID, COSTREPBAL, IF(MQUAN=0,1,COSTREPBAL/MQUAN) AS XCOST
EXCELSQL;FROM INVCARD LEFT JOIN INVMST ON INVCARD.ID = INVMST.ID
EXCELSQL;LEFT JOIN LOCA ON INVCARD.LOCID = LOCA.LOCID
EXCELSQL;WHERE ( TRTYPE = '01' OR TRTYPE = '00')
EXCELSQL;ORDER BY INVCARD.LOCID,ID,  DATEDOC, DOCNO
