fix(Payroll CTC Calculation): compute future non taxable earnings with full payment days #2302
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before
Create a salary slip for a month with payment days < total working days
Employee joined on May 6th. Taxable Earnings from previous employer have been set in SSA (Note: this step is not mandatory to replicate the issue. Just a partial payment days salary slip should work):
May month salary:
Payment Days (26) < Total Working Days (31)
Income Tax Breakup
CTC calculation = gross pay
So here the calculation should have been:
Previous employer taxable earnings = 136577
May month salary (gross pay) = 1,44,747.04 (as per 26 payment days)
Upcoming 10-month salary = 172583 (full payment days salary) ×10 (remaining 10 months) = 1725830
Actual CTC = 2007154.04
System's calculated CTC = 2005863.74
Difference = 1290.3
Problem
This was how system was calculating future month's non taxable earnings:
Here this reduces future earnings if current month has less payment days. Fixed it to consider full payment days for future tax calculations
After