Income tax calculation is wrong

I have setup the payroll period and tax slabs then i created salary structures and assigned them to employees however the tax calculation is not right Can anyone please help me with this. I am attaching the screenshots of the payroll period and the salary structure.

Have you specified the conditions for the tax calculation - see for eg this Multiple conditions on Salary Structure with a single formula

@tanzy

Would like to know a few things:

  • What is the DOJ of the employee?
  • For which month have you created the payroll for?

The date of joining is 12-09-2009 and I am generating payroll fro january 2020

Hey @tanzy, in Salary Component > Income Tax, have you checked the “Variable based on Taxable Salary” checkbox?


If not, kindly check the same and try running the payroll again.

Hope this helps.

I have done that already but still its not coming.

The income tax that is calculating is coming as 500 but how is that possible?

@tanzy
The reason for the inappropriate tax calculation could be because in your payroll period the date is Jan to Dec whereas in India you follow the financial year of April to March for calculating tax.

okay.I will check that. Thankyou

@Reema Mehta Can u please tell me how income tax is calculated in erpnext because now it is calculating the income tax based on the monthly incomes of the employee and not yearly income.
Please help me with this.

Clues like this may shed light

Some test case trial and error learning with say a spreadsheet will work too?

Thankyou for the reply. Its working fine now

@tanzy Is it correct for all the months for you? i.e. can you generate payslips for multiple months, keep the earning same and check the income tax.

For me, I get different income tax numbers for different months though earning is the same.

What did you exactly mean by this @tanzy? I am also facing income tax calculation related issue, hence I am interested in knowing your issues and the ways you solved them so that they may give me clue about my problem. Thanks!

The community deal and courtesy here is to share what you learned!

1 Like

Income tax computation is incorrect. Check the tables below.

The first table is the Excel sheet of computation based on the tax slab (columns K-O) with the correct computation on Column O and Column P showing the incorrect computation of ERPNext.

The second table is the selected columns from the Payroll Register that shows the incorrect tax computation. The difference is the inclusion of the tax as a tax deductible item.

I’ll try check the source code to identify the error. Anybody please help me out also on this.

I think the Tax Slab computation error is a showstopper so hopefully, some developers quickly fix this. Thanks a lot.

This test or others may need work to nail down the issue - you can never have enough tests :wink:

https://github.com/frappe/erpnext/blob/develop/erpnext/hr/doctype/salary_slip/test_salary_slip.py#L266

1 Like

Indeed yes the tests point the way forward etc