Skip to Content
0
Former Member
Jan 05, 2010 at 01:13 PM

Tax Break Up in Sales Report

22 Views

Hi Experts,

Below is the query i have used to run the Sales Register.

But i need the Tax wise breakup in this query..PLs update my query

(need to display the invoices by tax wise--

TaxCode 1

Inv no 1

inv no 2

.....

Inv no Z.

TaxCode 2

Inv no 1

inv no 2

.....

Inv no Z.

..

..

TaxCode N

Inv no 1

inv no 2

.....

Inv no Z.

)

SELECT M.DocNum AS ' Inv No. #', M.DocDate as 'Posting Date', M.CardName as 'Customer Name', 
(Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'BaseAmt.(Rs.)', 
 
M.VatSum as 'Tax (Rs.)',
M.DocTotal as 'Total (Rs.)',
(M.DocTotal-M.[PaidToDate]) as 'BalanceDue (Rs.)'
FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry 
LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum 
LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry

WHERE M.DocDate BETWEEN '[%0]' AND '[%1]' AND TargetType ! = 14 
GROUP BY 
M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,
M.WTSum,M.DocTotal,M.PaidToDate,M.VatSum
ORDER BY
M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,
M.WTSum,M.DocTotal,M.PaidToDate,M.VatSum

Thanks in advance,

Regards,

Vamsi.