SELECT oh.OAORNO, oh.OAORDT,oh.OARLDT, oh.OAWHLO, (select top 1 oh.OAWHLO from MVXJDTA.OOHEAD oa where (((oa.OACUNO=oh.OACUNO) and (oa.OAORNO<>oh.OAORNO)) and (oa.OAORTP IN('021','921','041','941')) and ((oh.OAORST between '22' and '77') OR (oh.OAORST in ('99')))) order by oa.OAORDT DESC) as BWH ,oh.OAORTP, (select top 1 oh.OAORTP from MVXJDTA.OOHEAD oa where (((oa.OACUNO=oh.OACUNO) and (oa.OAORNO<>oh.OAORNO)) and (oa.OAORTP IN('021','921','041','941')) and ((oh.OAORST between '22' and '77') OR (oh.OAORST in ('99')))) order by oa.OAORDT DESC) as BTAX ,oh.OACUNO,cu.OKCUNM, oh.OAORSL,oh.OAORST FROM MVXJDTA.OOHEAD as oh INNER JOIN MVXJDTA.OCUSMA AS cu ON oh.OACUNO = cu.OKCUNO WHERE ((((oh.OAORDT like '201803%')) and (oh.OAORTP in('021','921','041','941'))) AND (oh.OAORSL NOT IN('77','90'))) AND (oh.OAWHLO='') ORDER BY oh.OAORDT,oh.OASMCDตรวจสอบรายการ Order

เลขที่เอกสาร

วันที่เอกสาร

วันที่นัดส่ง

รหัสร้านค้า

ชื่อร้านค้า

คลังสินค้าออก

คลังสินค้าออก
(ก่อนหน้า)

WH Match

ใบกำกับภาษี

ใบกำกับภาษี
(ก่อนหน้า)

TAX Match

สถานะ

ส่ง Order
ไป DC