REPORTFORM;SC9_1.frf
TITLE;วิเคราะห์ต้นทุนขาย แสดง Job Detail
SQL;select invcard.DOCNO, invcard.DATEDOC, invcard.ACCID, armst.XCOMP,
SQL;invcard.SALEPURAMT, invcard.COSTAMT, jobmst.JDESC, invcard.JOBNO
SQL;from invcard
SQL;left join armst on invcard.ACCID = armst.ACCID
SQL;left join jobmst on invcard.JOBNO = jobmst.JOBNO
SQL;where (left(invcard.DOCNO,2) = "IV" or left(invcard.DOCNO,2) = "RI")
SQL;group by 1,2,3
SQL;order by invcard.JOBNO, invcard.DOCNO
CONDITION;ตั้งแต่วันที่~INVCARD.DATEDOC~Date~2~~
CONDITION;ตั้งแต่ Job #~INVCARD.JOBNO~Chr~2~SELECT JOBNO FROM JOBMST ~JOB
