Former Member

# Calculating tax code

Dear All,

When we are calculating service tax + VAT

Suppose,

Base amt- 1000

Service tax - 10.3 %

total value - 1103 and now vat 5 % is used in this total value then the balance is 1158.15 this.

when we are applying this condition in the sales form in UDF field of service tax break up .

i have a problem in calculating service tax + Vat query which i made in query generator but its not working . So please help me to generate the query of service tax + vat.

Regards,

Nikhil

10|10000 characters needed characters exceeded

### Related questions

• Former Member
Posted on Feb 09, 2012 at 11:18 AM

Hi Nikhil,

Is it only the query that you are looking for or are you looking for the formulss to create the tax code?

Thanks,

Joseph

10|10000 characters needed characters exceeded
• Former Member Former Member

HI Nikhil,

Assuming the you want to capture these details on header of ap invoice, you may use the fms mentioned below;

```Declare @TaxAmt Decimal(16,3)
Set @TaxAmt  = ( SELECT  Sum(T0.[TaxSum])  FROM PCH4 T0 Where Docentry = (Select Docentry from OPCH
Where DocNum = \$[OPCH.DocNum] and Series = \$[OPCH.Series]) and statype = 5 )
Select  @TaxAmt```

The statype mentioned in the query above is for service you can get the statype by using the following statement;

select * from ostt

you need to create different udf's for different tax types and just by changing the statype in the first query, you can get the tax amount for that particular document. Then you can use the query mentioned below to capture service tax + vat;

`SELECT \$[OPCH.U_UDF1.number]+\$[OPCH.U_UDF2.number]`

Please let me know in case if you have any other queries.

Thanks,

Joseph