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

Re: Modification my own sales report

$
0
0

Hi,

     Try this

 

select t0.docdate,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.docdate,t0.DocNum, t0.cardcode

 

 

union all

 

 

select t0.docdate,t0.DocNum,t0.cardcode, sum(t1.LineTotal)*-1 as 'Suma' from ORIN t0

inner join RIN1  t1 on t0.DocEntry=t1.DocEntry

WHERE  t0.FatherCard = [%2] and t0.CANCELED = 'N' and t0.docdate between [%0] and [%1]

group by t0.docdate,t0.DocNum, t0.cardcode

 

Regards,

Manish


Viewing all articles
Browse latest Browse all 8493

Trending Articles



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