Skip to Content
author's profile photo Former Member
Former Member

Sales Summary report by Tax code .

Hi Expert,

Can any one please help me to generate report of sales summary by Tax code wise which also includes A/R credit note i.e Column

Tax Code , A/R Invoice or A/R credit Memo (Document) , Net Amount, Tax Amount , Freight , Total

2% CST , IN , 19828476.46 , 396569.52 , 1494.02 , 20226540.00

2% CST CN , -4528.43 , -90.57 , 0.00 , -4619.00

_______________________________________________________

19823948.03 , 396478.95 , 1494.02 , 20221921.0

Sudhir.

Edited by: sudhir pawar on Oct 12, 2010 2:28 PM

Edited by: sudhir pawar on Oct 12, 2010 2:28 PM

Edited by: sudhir pawar on Oct 12, 2010 2:29 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2010 at 02:33 PM

    Hi Sudhir,

    Try this:

    SELECT T1.TaxCode, 'IN' AS 'Document', SUM(T1.LineTotal) 'Net Amount', SUM(T1.LineVat) 'Tax Amount', SUM(T1.GTotal-T1.LineTotal-LineVat) 'Freight', SUM(T1.GTotal) 'Total'

    FROM dbo.OINV T0

    INNER JOIN dbo.INV1 T1 ON T1.DocEntry=T0.DocEntry

    GROUP BY T1.TaxCode

    UNION

    SELECT T1.TaxCode, 'CR' AS 'Document', -SUM(T1.LineTotal) 'Net Amount', -SUM(T1.LineVat) 'Tax Amount', SUM(T1.GTotal-T1.LineTotal-LineVat) 'Freight', -SUM(T1.GTotal) 'Total'

    FROM dbo.ORIN T0

    INNER JOIN dbo.RIN1 T1 ON T1.DocEntry=T0.DocEntry

    GROUP BY T1.TaxCode

    Thanks,

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.