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(CTC): amount_exempted_from_income_tax only considers last deduction item (exempted from IT), not all (backport #2568) #2570

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 2, 2025

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
gross

Incorrect CTC
ctc-incorrect

Problem

Expected calculation:

CTC formula in the system = (
self.previous_taxable_earnings_before_exemption (0)
+ self.current_structured_taxable_earnings_before_exemption ($${\color{green}1,97,800}$$)
+ self.future_structured_taxable_earnings_before_exemption ($${\color{green}21,75,800}$$)
+ 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 = (
self.previous_taxable_earnings_before_exemption (0)
+ self.current_structured_taxable_earnings_before_exemption ($${\color{red}1,85,547.0}$$)
+ self.future_structured_taxable_earnings_before_exemption ($${\color{red}20,41,017}$$)
+ 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 summation


This is an automatic backport of pull request #2568 done by [Mergify](https://mergify.com).

…tion item (exempted from IT), not all (#2568)

(cherry picked from commit 71dc1b0)
@mergify mergify bot requested a review from ruchamahabal as a code owner January 2, 2025 08:32
@ruchamahabal ruchamahabal merged commit 2fac99d into version-15-hotfix Jan 2, 2025
7 of 8 checks passed
frappe-pr-bot pushed a commit that referenced this pull request Jan 8, 2025
## [15.37.2](v15.37.1...v15.37.2) (2025-01-08)

### Bug Fixes

* correct date handling for get_weekday in shift schedule assignment (backport [#2567](#2567)) ([#2573](#2573)) ([8e9882d](8e9882d))
* **CTC:** `amount_exempted_from_income_tax` only considers last deduction item (exempted from IT), not all (backport [#2568](#2568)) ([#2570](#2570)) ([2fac99d](2fac99d))
* skip patch if previous doctype doesn't exist (backport [#2571](#2571)) ([#2572](#2572)) ([bc4436b](bc4436b))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 15.37.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants