Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect tax calculation in case of reduced payment days #31

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

ruchamahabal
Copy link
Member

@ruchamahabal ruchamahabal commented Aug 8, 2022

Problem:

After frappe/erpnext#31521 components dependent on other components (based on payment days) started getting updated values while setting up "default amount" itself.

This leads to incorrect TDS calculations for employees with lesser payment days in the current month. TDS considers the default amount (without payment days) while calculating the taxable amount.

Structure:

image

Salary Slip for the employee with DOJ 4/7/22 = 28/31 payment days:

tds-before

Fix:

Keep a track of default amounts for components to update default amounts for dependent components.

tds-after

@codecov-commenter
Copy link

Codecov Report

Merging #31 (44e1dd4) into develop (47f8a81) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop      #31   +/-   ##
========================================
  Coverage    71.80%   71.81%           
========================================
  Files          174      174           
  Lines         8655     8658    +3     
========================================
+ Hits          6215     6218    +3     
  Misses        2440     2440           
Impacted Files Coverage Δ
hrms/payroll/doctype/salary_slip/salary_slip.py 87.18% <100.00%> (+0.04%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants