cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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]

Accepted Solutions (0)

Answers (0)