fix(CTC): amount_exempted_from_income_tax
only considers last deduction item (exempted from IT), not all (backport #2568)
#2570
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
Gross = ₹ 2,05,000.00
Expected CTC = Gross * 12 (direct formula only applicable when payment days are full) = 24,60,000
Actual CTC = ₹ 23,12,964.00
Gross
Incorrect CTC
Problem
Expected calculation:
CTC formula in the system = ($${\color{green}1,97,800}$$ )$${\color{green}21,75,800}$$ )
self.previous_taxable_earnings_before_exemption (0)
+ self.current_structured_taxable_earnings_before_exemption (
+ self.future_structured_taxable_earnings_before_exemption (
+ self.current_additional_earnings (0)
+ self.other_incomes (0)
+ self.unclaimed_taxable_benefits (0)
+ self.non_taxable_earnings (86,400)
) = 24,60,000
Actual amounts:
CTC formula in the system = ($${\color{red}1,85,547.0}$$ )$${\color{red}20,41,017}$$ )
self.previous_taxable_earnings_before_exemption (0)
+ self.current_structured_taxable_earnings_before_exemption (
+ self.future_structured_taxable_earnings_before_exemption (
+ self.current_additional_earnings (0)
+ self.other_incomes (0)
+ self.unclaimed_taxable_benefits (0)
+ self.non_taxable_earnings (86,400)
) = 23,12,964.00
current & future taxable earnings are causing the difference
this difference is caused because
amount_exempted_from_income_tax
is getting overwritten inside the for loop, not considering cumulative summationThis is an automatic backport of pull request #2568 done by [Mergify](https://mergify.com).