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: remove non-taxable earning components on tax exemption #2608

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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