How to get the child and parent relationship of invoices
Hi Team,
I am working oracle payables report of in R12.
In the report , i am showing invoice number, amount , dates,line data and distribution data.
Additionally I also need to show the child records of the standard invoice like TDS invoices, RTN invoices with their respective amounts.
Here i have build a subquery which calculates RTN amount, RTN invoices of the standard invoice.
One of the sample subquery from my report :
(select NVL(SUM(aia.invoice_amount),0)
from ap_invoices_all aia,ap_invoice_lines_all aill,ap_invoice_distributions_all aida --,ap_suppliers aps
where aia.attribute1 =ai.invoice_id -- standard invoice id