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

Re: Sales report required warehouse  & sales employee wise

$
0
0

Hi guys,

 

Finally I made this query ... Thanks for ur reply... I am posting the query for all ur reference SELECT  T0.Docentry, T0.[DocNum], T0.docdate, Case when T0.DocType = 'I' then 'INVOICE' when T0.DocType = 'S' then 'INVOICE' End 'Doctype',   T1.Linetotal as 'TotalSellingprice',   (T1.GrssProfit) AS [GrossProfit],   (((Coalesce((T1.GrssProfit),0))/NullIf((T1.LineTotal),0))*100) as [GrosProfit%],   T0.[CardCode],   T0.[CardName],   T1.WhsCode as 'warehouse',   T7.CardFName AS 'Branch',   T4.[SlpName] FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OMRC T3 ON T2.FirmCode = T3.FirmCode INNER JOIN OSLP T4 ON T0.SlpCode = T4.SlpCode INNER JOIN OITB T5 ON T5.[ItmsGrpCod] = T2.[ItmsGrpCod] INNER JOIN OMRC T6 ON T2.FirmCode = T6.FirmCode INNER JOIN OCRD T7 on T7.CardCode = T0.CardCode WHERE t0.docdate >= [%1] and t0.docdate= [%1] and t0.docdate


Viewing all articles
Browse latest Browse all 8372

Trending Articles



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