Hello i wrote this report to summary sales from invoices:
select t0.DocNum,t0.cardcode, sum(t1.LineTotal) as 'Suma' from OINV t0
inner join INV1 t1 on t0.DocEntry=t1.DocEntry
WHERE t0.FatherCard = [%2] and t0.CANCELED = 'N' and t0.docdate between [%0] and [%1]
group by t0.DocNum, t0.cardcode
I want to modify it. I need include figures from a/r correction invoices. Can somebody help me?
Best Regards