Skip to content

Commit

Permalink
chore: fixed linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
asmitahase committed Jan 10, 2025
1 parent acd618f commit de06a25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hrms/hr/doctype/leave_encashment/leave_encashment.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,14 @@ def create_leave_ledger_entry(self, submit=True):

to_date = leave_allocation.get("to_date")

can_expire = not frappe.db.get_value("Leave Type",self.leave_type,"is_carry_forward")
can_expire = not frappe.db.get_value("Leave Type", self.leave_type, "is_carry_forward")
if to_date < getdate() and can_expire:
args = frappe._dict(
leaves=self.encashment_days, from_date=to_date, to_date=to_date, is_carry_forward=0
)
create_leave_ledger_entry(self, args, submit)


def create_leave_encashment(leave_allocation):
"""Creates leave encashment for the given allocations"""
for allocation in leave_allocation:
Expand Down

0 comments on commit de06a25

Please sign in to comment.