Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8578

Re: Trying to create a query that shows Sales Order/Invoice Totals as well as Paid/Outstanding/Available Down Payments

$
0
0

Hi,

 

Try this query and let me know your feedback.

 

SELECT T0.[DocNum] as SO#, T0.[DocTotal] as SOTotal, T3.[DocNum] as ARDown#, T3.[DocTotal] as ARDownTotal, T5.[DocNum] as Incoming#, T4.[SumApplied] as Incomingpayment, T8.[DocNum] as ARinoice#, T8.[DocTotal] as ARtotal FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry left join DPI1 T2 on  T2.[BaseEntry] = t1.docentry and  T2.[BaseLine] = T1.[LineNum]INNER JOIN ODPI T3 ON T2.DocEntry = T3.DocEntry left join  RCT2 T4 on T4.[DocEntry]  =  T3.[DocNum] and T4.[InvoiceId] = T2.[LineNum]   INNER JOIN ORCT T5 ON T4.DocNum = T5.DocEntry left join  DLN1 T6 on T6.[BaseEntry]  = t1.docentry and  T6.[BaseLine] =  T1.[LineNum] left join INV1 T7 on  T7.[BaseEntry]  = t6.docentry and  T7.[BaseLine] = T6.[LineNum] INNER JOIN OINV T8 ON T7.DocEntry = T8.DocEntry WHERE T0.[CardCode]  = [%0]

 

Thanks & Regards,

Nagarajan


Viewing all articles
Browse latest Browse all 8578

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>