REPORTFORM;BR6.frf
TITLE;สรุปการรับเงินสด/เช็คแระจำวันแยก JOB
SQL;select bktr.DOCNO,
SQL;armst.XCOMP, bktr.AMT_IN, bktr.JOBNO, jobmst.JDESC,
SQL;if(left(bktr.PAYTYPE,2)="01",bktr.AMT_IN,0) as XCASH,
SQL;if(left(bktr.PAYTYPE,2)="02",bktr.AMT_IN,0) as XCHK,
SQL;if(left(bktr.PAYTYPE,2)="06",bktr.AMT_IN,0) as XTRAN
SQL;from bktr 
SQL;left join armst on bktr.ARACCID = armst.ACCID
SQL;left join jobmst on bktr.JOBNO = jobmst.JOBNO
SQL;where left(bktr.TRTYPE,2) = "AR" and 
SQL;(left(bktr.PAYTYPE,2) = "01" or left(bktr.PAYTYPE,2) = "02" or left(bktr.paytype,2)="06" )
SQL;order by bktr.DOCNO
CONDITION;ตั้งแต่วันที่~BKTR.DATEDOC~Date~2~~
CONDITION;ตั้งแต่ Job #~BKTR.JOBNO~Chr~2~SELECT JOBNO FROM JOBMST ~JOB
