SQL query - Supplier, PO, Invoices, Payments, and Supplier Advances
Hi All,
Need your help for a SQL query to provide the following data:
Supplier | PO | PO Line # | Line Item | Quantity | Line Amount | Quantity Billed | Invoice Number | Invoice Amount | Invoice Date | Invoice Amount Paid | Check Number | Check Amount | Check Date |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There could be advances paid to the supplier which are not referenced to any PO. The advances will be matched (partially or completely) as and when the invoice is raised.
The invoice amount could be in any currency too, hence invoice exchange rate may differ from the check exchange rate (in case of supplier advances).
Require the help of the SQL gurus here to help me out in this requirement for our Accounts department.