diff --git a/hrms/hr/doctype/leave_application/leave_application.py b/hrms/hr/doctype/leave_application/leave_application.py index 2ffb45d54c..d2df12ac1b 100755 --- a/hrms/hr/doctype/leave_application/leave_application.py +++ b/hrms/hr/doctype/leave_application/leave_application.py @@ -953,7 +953,7 @@ def get_leave_allocation_records(employee, date, leave_type=None): & (Ledger.docstatus == 1) & (Ledger.transaction_type == "Leave Allocation") & (Ledger.employee == employee) - & (Ledger.is_expired == 0) + & (LeaveAllocation.expired == 0) & (Ledger.is_lwp == 0) & ( # newly allocated leave's end date is same as the leave allocation's to date