Skip to content

Commit

Permalink
fix: remove non-taxable earning components on tax exemption
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudharsanan11 authored and venkat102 committed Jan 9, 2025
1 parent ff20980 commit 9b3b0d1
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9b3b0d1

Please sign in to comment.