Query to find AP Invoices matched with receipts
•By Amol Jadhav
Query to find AP Invoices matched with receipts
Oracle apps ebs AP Invoices matched with receipts
SQL Querysql
1SELECT 'Receipt' matching,
2 pv.vendor_name,
3 pv.segment1 vendor#,
4 pvs.vendor_site_code vendor_site,
5 i.invoice_num,
6 i.invoice_date,
7 d.accounting_date,
8 i.invoice_amount,
9 i.amount_paid,
10 d.distribution_line_number,
11 h.receipt_num,
12 t.transaction_date,
13 h.shipment_num,
14 ph.segment1 po#,
15 pl.line_num po_line_num,
16 d.line_type_lookup_code,
17 d.description,
18 pl.item_description,
19 d.amount line_amount,
20 d.quantity_invoiced,
21 DECODE (d.line_type_lookup_code, 'TAX', 0, pl.quantity) po_line_qty,
22 DECODE (d.line_type_lookup_code, 'TAX', 0, pl.unit_price) unit_price,
23 DECODE (d.line_type_lookup_code, 'TAX', 0, t.quantity) receipt_qty,
24 i.vendor_id,
25 i.vendor_site_id,
26 i.invoice_id,
27 d.invoice_distribution_id,
28 ph.po_header_id,
29 pl.po_line_id,
30 pd.po_distribution_id,
31 pl.ITEM_ID
32 FROM ap_invoice_distributions_all d,
33 ap_invoices_all i,
34 po_distributions_all pd,
35 rcv_transactions t,
36 rcv_shipment_headers h,
37 po_lines_all pl,
38 po_headers_all ph,
39 po_vendors pv,
40 po_vendor_sites_all pvs
41 WHERE i.invoice_id = d.invoice_id
42 AND i.vendor_id = pv.vendor_id
43 AND i.vendor_site_id = pvs.vendor_site_id
44 AND d.po_distribution_id = pd.po_distribution_id
45 AND d.rcv_transaction_id = t.transaction_id
46 AND h.shipment_header_id = t.shipment_header_id(+)
47 AND t.po_line_id = pl.po_line_id
48 AND pl.po_header_id = ph.po_header_id
49--AND i.invoice_amount = 0
50ORDER BY t.transaction_date DESCRelated posts:
- View accounting query in oracle apps R12
- Query to get AR invoice SLA and GL details
- Accounting entries not transferred to the General Ledger
- Query to find all APIs of Oracle Apps modules
- R12 AR cash receipt SLA and GL details query
- Oracle apps AR Applications and SLA details
- Oracle EBS query to get AP Invoice SLA Details
- Oracle EBS query to get AR Invoice SLA Details
- Oracle AR Remit to address query
- Oracle Apps iExpense credit card details query
- Query to get customer tax registration details in R12
- Purchase Requisition Vertex debug xml query in Oracle EBS