REPORTFORM;PO5.frf
TITLE;รายงานยอดค้างรับตาม Job # สินค้า วันนัดรับ
SQL;select po.ID, invmst.XDESC, po.QUAN, po.UNIT_SAL, po.PRICE,
SQL;po.DISCL, po.AMOUNT_L, po.DOCNO, po.DATEDOC, pohead.SENDDATE,
SQL;pohead.ACCID, apmst.XCOMP, pohead.DPTID, pohead.AMOUNT_D,po.REC,
SQL;pohead.JOBNO,jobmst.JDESC,
SQL;pohead.VATAMT, pohead.DISCD
SQL;from po
SQL;left join pohead on po.DOCNO = pohead.DOCNO
SQL;left join invmst on po.ID = invmst.ID
SQL;left join apmst on pohead.ACCID = apmst.ACCID
SQL;left join jobmst on pohead.JOBNO = jobmst.JOBNO
SQL;where left(po.DOCNO,2)="PO" and pohead.void = 0
SQL;order by pohead.JOBNO, po.ID, pohead.SENDDATE, pohead.DATEDOC, pohead.DOCNO
CONDITION;ตั้งแต่รหัสสินค้า~PO.ID~Chr~2~SELECT ID FROM INVMST ~INV
CONDITION;ตั้งแต่วันนัด~POHEAD.SENDDATE~Date~2~~
CONDITION;ตั้งแต่รหัส Job #~POHEAD.JOBNO~Chr~2~SELECT JOBNO FROM JOBMST~JOB
CONDITION;เงื่อนไข~~TextFile~~POCON.TXT~
EXCELSQL;select po.ID, invmst.XDESC, po.QUAN, po.UNIT_SAL, po.PRICE,
EXCELSQL;po.DISCL, po.AMOUNT_L, po.DOCNO, po.DATEDOC, pohead.SENDDATE,
EXCELSQL;pohead.ACCID, apmst.XCOMP, pohead.DPTID, pohead.AMOUNT_D,po.REC,
EXCELSQL;pohead.JOBNO,jobmst.JDESC,
EXCELSQL;pohead.VATAMT, pohead.DISCD,po.prno, po.prline
EXCELSQL;from po
EXCELSQL;left join pohead on po.DOCNO = pohead.DOCNO
EXCELSQL;left join invmst on po.ID = invmst.ID
EXCELSQL;left join apmst on pohead.ACCID = apmst.ACCID
EXCELSQL;left join jobmst on pohead.JOBNO = jobmst.JOBNO
EXCELSQL;where left(po.DOCNO,2)="PO" and pohead.void = 0
EXCELSQL;order by pohead.JOBNO, po.ID, pohead.SENDDATE, pohead.DATEDOC, pohead.DOCNO
