Skip to content

Commit

Permalink
fix: reset loans only if field exists
Browse files Browse the repository at this point in the history
(cherry picked from commit 7549d49)
  • Loading branch information
ruchamahabal authored and mergify[bot] committed Feb 28, 2025
1 parent b5f2d3f commit 2426810
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hrms/payroll/doctype/salary_slip/salary_slip.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,10 @@ def get_date_details(self):
def get_emp_and_working_day_details(self):
"""First time, load all the components from salary structure"""
if self.employee:
self.set("loans", [])
self.set("earnings", [])
self.set("deductions", [])
if hasattr(self, "loans"):
self.set("loans", [])

if self.payroll_frequency:
self.get_date_details()
Expand Down

0 comments on commit 2426810

Please sign in to comment.