on 12-26-2016 12:43 PM
Dear Experts,
The query below gives details of customer invoice details and payments received against those invoices but small issues its also showing entries for brs is done for those entries the payment date is showing null but amount paid showing full amount but when checked there is no incoming payment for those entry. need help to display date for brs done entry
/*select T0.docdate from oinv t0*/ Declare @fdate as date set @fdate = [%0] /*select T0.docdate from oinv t0*/ Declare @tdate as date set @tdate = [%1] SELECT T0.DocNum as 'Invoice Code',T0.DocDate as 'Invoice Date',T0.DocDueDate as 'Invoice DueDate', T0.DocTotal AS 'Invoice Value', (select top 1 a.DocDate from ORCT a Inner Join RCT2 B on a.DocEntry=b.DocNum where b.DocEntry = t0.DocEntry ) AS 'Payment Date', isnull(T0.PaidSum,0) 'Amount Paid' FROM OINV T0 WHERE T0.CANCELED ='N' and T0.DocDate Between @fdate and @tdate
Regards,
Karthik B
User | Count |
---|---|
88 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.