How to Retrieve Open Orders That Are Not Invoiced Through Query
SELECT INV_ITM_INV_DATE, INV_ITM_ITM_NO, INV_ITM_DESC_1,
INV_ITM_DESC_2, INV_ITM_QTY_ORDER,
INV_ITM_TOT_QTY_SHP, INV_ITM_UNIT_PRICE, INV_ITM_UNIT_COST,
(INV_ITM_UNIT_PRICE*INV_ITM_QTY_ORDER) AS ExtPrice,
INV_ITM_INV_NO, INV_ITM_PROD_CATE, INV_TYPE, INV_ITM_CUST_NO, INV_SHIP_TO_NO,
INV_SHIP_TO_NAME, INV_SHIP_TO_ADDR_1,
INV_SHIP_TO_CITY, INV_SHIP_TO_ST, INV_SHIP_TO_ZIPCD, INV_SHIP_TO_COUNTRY
FROM CPINVLIN INNER JOIN CPINVHDR ON INV_ITM_INV_NO = INV_NO
WHERE INV_ITM_ITM_NO='R006-A' OR INV_ITM_ITM_NO='R006-B' OR
INV_ITM_ITM_NO='R006-B5' OR INV_ITM_ITM_NO='R006-C' OR INV_ITM_ITM_NO='R005-A'
OR INV_ITM_ITM_NO='R005-B' OR
INV_ITM_ITM_NO='R005-B5' OR INV_ITM_ITM_NO='R005-C' AND
INV_ITM_INV_DATE>=20200101 AND INV_ITM_INV_DATE<=20220331
- C – Order is complete
- I – Order is incomplete or in middle of editing
- S – Order is selected
- X – Order is invoiced
- N – Order is invoiced not OK (a temporary status before user answer “Are Invoice Printed OK”)
- Z – Order is posted (history)