Hii,
I have written a StoredProcedure for Sales Summary report by Saleman dimension on CUSTINVOICETRANS table by adding Sales Amount and Sales Return in a UNION if Qty>0 for sales order, Qty < 0 for return order.
One thing I am not understanding is, how to calculate Gross Margin?
What tables to add in query and how its calculated?