SQL-Query - AR Invoice and related AR Down Payment Invoices
I want to show all AR Down Payment Invoices related to a given AR Invoice, i.e. a query approximately in this form:
T0.DocNum AS 'Invoice',
T0.DocDate AS 'Invoice Date',
T0.DocTotal AS 'Open Amount',
T1.<<DocNum>> AS 'Down Payment Invoice',
T1.<<DocDate>> AS 'Down Payment Invoice Date',
T1.<<Amount>> AS 'Down Payment Invoice Amount'
OINV T0 INNER JOIN <<Down Payment Invoices>> T1
ON T0.DocEntry = T1.<<DocEntry>>
T0.DocNum = xxxxx
I want to know if such a table <<Down Payment Invoices>> exists and what its name is.
Thanks for your help!