diff --git a/hrms/hr/doctype/leave_encashment/leave_encashment.py b/hrms/hr/doctype/leave_encashment/leave_encashment.py index 33ccd2b71b..66481f6bea 100644 --- a/hrms/hr/doctype/leave_encashment/leave_encashment.py +++ b/hrms/hr/doctype/leave_encashment/leave_encashment.py @@ -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: