Skip to Content

Query to find out what purchase order line items have not been received into stock

Hi,

I recently noticed that my simple query was not working due. In our business we use AP Reserve Invoices when we import. This results in the Purchase Order line item Open Quantity being reduced to 0. How do we determine accurately what has not yet been received into the warehouse when we both use Reserve Invoices and also create Goods Receipts directly off Purchase Orders. I tried the query below, but it doesn't work.

SELECT T0.[DocNum], T0.[CardCode], T0.[CardName], T1.[ShipDate] AS 'Due in Warehouse',T1.[ItemCode], T1.[Dscription] FROM OPOR T0  INNER JOIN POR1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN PCH1 T2 ON T1.[DocEntry]=T2.[BaseRef] WHERE (T1.[OpenQty]>0 AND (T2.[OpenQty]>0 AND T2.[InvQty]>0)) AND  T0.[PoPrss] ='N'  ORDER BY T1.[ShipDate]
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers