Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8985

Re: Report for TDS

$
0
0

Hi,

 

I need Manual journal Entries into this query(only TDS included)

 

Query:

 

SELECT 'AP Invoice' 'Types', T1.[DocDate], T1.[DocNum], T1.[CardName] as 'Vendor Name', T1.[Address], T3.[TaxId0] as 'PAN No', T6.[Descr] as 'Type', T1.[NumAtCard] as 'Vendor Ref No', ISNULL((SELECT SUM(Z0.TaxSum) FROM PCH4 Z0 WHERE Z0.DocEntry = T1.DocEntry AND Z0.staType IN(5,6,-10)),0) as 'Service Tax Amt',T0.[TdsRate], T0.[TaxbleAmnt], T0.[WTAmnt],T0.[WTAmnt]+T0.[TaxbleAmnt] as Total, T2.[AcctName], T4.[WTName],T4.OffclCode,T5.location FROM PCH5  T0

INNER JOIN [dbo].[OPCH] T1 ON T0.AbsEntry = T1.DocEntry

INNER JOIN OACT T2 ON T0.TDSACC = T2.AcctCode

INNER JOIN PCH12 T3 ON T1.DocEntry = T3.DocEntry

INNER JOIN OWHT T4 ON T0.WTCode = T4.WTCode

INNER JOIN OLCT T5 ON T4.Location=T5.Code

INNER JOIN ONOA T6 ON T6.AbsId = T4.Assessee

WHERE T1.[DocDate] BETWEEN [%0] AND [%1]

UNION ALL

SELECT 'AP Credit Memo' 'Types',T1.[DocDate], T1.[DocNum], T1.[CardName] as 'Vendor Name', T1.[Address], T3.[TaxId0] as 'PAN No', T6.[Descr] as 'Type', T1.[NumAtCard] as 'Vendor Ref No', ISNULL((SELECT SUM(Z0.TaxSum) FROM PCH4 Z0 WHERE Z0.DocEntry = T1.DocEntry AND Z0.staType IN(5,6,-10)),0) as 'Service Tax Amt',T0.[TdsRate], T0.[TaxbleAmnt], T0.[WTAmnt],T0.[WTAmnt]+T0.[TaxbleAmnt] as Total, T2.[AcctName], T4.[WTName],T4.OffclCode,T5.location FROM RPC5  T0

INNER JOIN [dbo].[ORPC] T1 ON T0.AbsEntry = T1.DocEntry

INNER JOIN OACT T2 ON T0.TDSACC = T2.AcctCode

INNER JOIN RPC12 T3 ON T1.DocEntry = T3.DocEntry

INNER JOIN OWHT T4 ON T0.WTCode = T4.WTCode

INNER JOIN OLCT T5 ON T4.Location=T5.Code

INNER JOIN ONOA T6 ON T6.AbsId = T4.Assessee

WHERE T1.[DocDate] BETWEEN [%0] AND [%1]

UNION ALL

SELECT 'AP Down payment Invoice' 'Types',T1.[DocDate], T1.[DocNum], T1.[CardName] as 'Vendor Name', T1.[Address], T3.[TaxId0] as 'PAN No', T6.[Descr] as 'Type', T1.[NumAtCard] as 'Vendor Ref No', ISNULL((SELECT SUM(Z0.TaxSum) FROM PCH4 Z0 WHERE Z0.DocEntry = T1.DocEntry AND Z0.staType IN(5,6,-10)),0) as 'Service Tax Amt',T0.[TdsRate], T0.[TaxbleAmnt], T0.[WTAmnt],T0.[WTAmnt]+T0.[TaxbleAmnt] as Total, T2.[AcctName], T4.[WTName],T4.OffclCode,T5.location FROM DPO5  T0

INNER JOIN [dbo].[ODPO] T1 ON T0.AbsEntry = T1.DocEntry

INNER JOIN OACT T2 ON T0.TDSACC = T2.AcctCode

INNER JOIN DPO12 T3 ON T1.DocEntry = T3.DocEntry

INNER JOIN OWHT T4 ON T0.WTCode = T4.WTCode

INNER JOIN OLCT T5 ON T4.Location=T5.Code

INNER JOIN ONOA T6 ON T6.AbsId = T4.Assessee

WHERE T1.[DocDate] BETWEEN [%0] AND [%1]

ORDER BY 'DocDate'

 

 

Regards,

Saikrishna.


Viewing all articles
Browse latest Browse all 8985

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>