From 215a61c4812c89faadcb71199f0a82e701b76fd5 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Thu, 9 Jan 2025 17:04:21 +0530 Subject: [PATCH] fix: remove non-taxable earning components on tax exemption --- .../income_tax_computation.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hrms/payroll/report/income_tax_computation/income_tax_computation.py b/hrms/payroll/report/income_tax_computation/income_tax_computation.py index d6a814ed23..ba66ade121 100644 --- a/hrms/payroll/report/income_tax_computation/income_tax_computation.py +++ b/hrms/payroll/report/income_tax_computation/income_tax_computation.py @@ -249,24 +249,14 @@ def add_exemptions_from_future_salary_slips(self, employee, exemptions): return exemptions def get_tax_exempted_components(self): - # nontaxable earning components - nontaxable_earning_components = [ - d.name - for d in frappe.get_all( - "Salary Component", {"type": "Earning", "is_tax_applicable": 0, "disabled": 0} - ) - ] - - # tax exempted deduction components - tax_exempted_deduction_components = [ + # tax exempted components + tax_exempted_components = [ d.name for d in frappe.get_all( "Salary Component", {"type": "Deduction", "exempted_from_income_tax": 1, "disabled": 0} ) ] - tax_exempted_components = nontaxable_earning_components + tax_exempted_deduction_components - # Add columns for d in tax_exempted_components: self.add_column(d)