Skip to Content
0

HSN code wise consolidated report

Sep 27, 2017 at 11:12 AM

357

avatar image
Former Member

Hi,

Using the below query i am trying to fetch HSN code(ChapterID) wise consolidated sales report , But the line items are repeating.

Select D.ChapterID 'HSN Code',b.Dscription 'Item Description',b.UomCode 'UOM', sum(b.Quantity) 'Quantity' ,Sum(b.LineTotal) 'Total Value',sum(b.PriceBefDi * b.Quantity ) 'Total Taxable Value', case when E.staType ='-100' then SUM (E.TaxSum) else 0 end 'CGST Amount', case when E.staType ='-110' then SUM (E.TaxSum) else 0 end 'SGST Amount', case when E.staType ='-120' then SUM (E.TaxSum) else 0 end 'IGST Amount' from OINV A join INV1 B on A.DocEntry =b.DocEntry left join INV4 E on E.DocEntry =A.DocEntry left join OITM C on B.ItemCode =C .ItemCode left join OCHP D on D.AbsEntry =c.ChapterID group by D.ChapterID ,b.Dscription,b.UomCode,E.staType

Rgds,

Krishna

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Nov 06, 2017 at 02:34 PM
0

i have same Problem i have make crystal report data will be ok but no in sql.

Share
10 |10000 characters needed characters left characters exceeded