Skip to content

Commit

Permalink
fix: allow optional tax component addition & removal (#814)
Browse files Browse the repository at this point in the history
(cherry picked from commit 74b7a4b)
  • Loading branch information
ruchamahabal authored and mergify[bot] committed Aug 23, 2023
1 parent b931037 commit 23bcf14
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hrms/payroll/doctype/salary_slip/salary_slip.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,13 @@ def add_tax_components(self):
else:
self.other_deduction_components.append(d.salary_component)

# consider manually added tax component
if not tax_components:
tax_components = [
d.salary_component for d in self.get("deductions") if d.variable_based_on_taxable_salary
]

if self.is_new() and not tax_components:
tax_components = self.get_tax_components()
frappe.msgprint(
_(
Expand Down

0 comments on commit 23bcf14

Please sign in to comment.