SQL query to get unreceipted PO
Hi I am trying to trying to write a query to get un receipted po details. but my facing difficulty as i have to consider POs for which there is no open receipt. Open receipt means that receipt has been created, however there is no invoice created against the receipt and also If there is a PO where there are multiple lines, it should only consider the PO for the unreceipted portion of the PO. It should check whether there are any open receipts, and if there are, then it should not consider the PO.
Your help will be appreciated.