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

Re: Incoming Payments Query

$
0
0

I don't have the data to test. Try this update:

 

SELECT T0.CardCode 'Customer Code', T0.CardName 'Customer Name', T2.DocNum 'Payment#',T2.DocDate 'Pay Date',T0.[DocNum] 'Invoice#', T1.InstID,T0.DocDate 'Invoice Date',   T0.DocDueDate, DateDiff(d,T0.DocDueDate,T2.DocDate) 'Overdue Days',T0.DocTotal 'Total', [SumApplied] 'Total Payment'

FROM  [dbo].[OINV] T0  LEFT JOIN [dbo].[RCT2] T1  ON  T1.[DocEntry] = T0.[DocEntry]    LEFT JOIN [dbo].[ORCT] T2  ON  T2.[DocNum] = T1.[DocNum]   WHERE T2.Canceled='N'  AND T0.Canceled='N' AND T0.CardName LIKE '[%0]%'

Order By T0.CardCode,T0.[DocDate] Desc


Viewing all articles
Browse latest Browse all 10482

Trending Articles



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