Skip to content

Commit

Permalink
fix: allow optional tax component addition & removal (backport #814) (#…
Browse files Browse the repository at this point in the history
…815)

Co-authored-by: Rucha Mahabal <[email protected]>
  • Loading branch information
mergify[bot] and ruchamahabal authored Aug 23, 2023
1 parent b931037 commit 186e882
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 186e882

Please sign in to comment.