Hi experts,
SELECT op.docentry,
op.docnum,
op.docdate,
op.cardcode,
op.cardname,
p1.itemcode,
p1.dscription as 'Item Name',
p1.Quantity,
p1.price,
p1.linetotal,
isnull(vat.taxsum,0) as 'VAT Amount',
isnull(cst.taxsum,0) as 'CST Amount',
Excise.taxsum as 'Cenvat Amount',
Cess.TaxSum as 'Cess Amount',
Hcess.Taxsum as ' Hcess Amount',
op.discsum as 'Discount',
op.TotalExpns as 'Freight Charges',
op.doctotal
from OPCH op
inner join PCH1 p1 on
op.docentry=p1.docentry
left outer join (select * from pch4 where statype=1) vat on p1.linenum=vat.linenum and p1.docentry=vat.docentry
left outer join (select * from pch4 where statype=4) cst on p1.linenum=cst.linenum and p1.docentry=cst.docentry
left outer join (select * from pch4 where statype=-90) excise on p1.linenum=excise.linenum and p1.docentry=excise.docentry
left outer join (select * from pch4 where statype=-60) cess on p1.linenum=cess.linenum and p1.docentry=cess.docentry
left outer join (select * from pch4 where statype=-55) Hcess on p1.linenum=Hcess.linenum and p1.docentry=Hcess.docentry
This query is being used for purchase register in CR,
The requirement is to show the Tax rate as well side by side...
like...
CST @ 2
etc...in CR.
Please help if it can be done.
Thanks in Advance