SELECT DISTINCT c.EXP_ID,c.IVS_DATE,a.IVT_ID, b.IVT_NAME, b.IVC_ID, a.QUANTITY, d.UUNIT_NAME,
ROUND(a.PACK_PRICE,2) as PACK_PRICE,
ROUND(a.QUANTITY * a.PACK_PRICE,2) AS TOTAL
FROM order_details a, inventory b, invoices c, ivt_units d
WHERE -- c.IVS_DATE >= (SELECT MAX(IVS_DATE)FROM mb_materials)
c.IVS_DATE >= '2020-01-01 00:00'
AND a.IVS_ID = c.IVS_ID AND a.IVT_ID = b.IVT_ID
#AND c.EXP_ID = '013'
AND a.UUNIT_ID =d.UUNIT_ID
AND IVC_ID = 04
ORDER BY a.ivt_id
ไม่มีความคิดเห็น:
แสดงความคิดเห็น