mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix: update filters
This commit is contained in:
@@ -433,7 +433,8 @@ def get_leave_details(employee, date):
|
|||||||
'from_date': ('<=', date),
|
'from_date': ('<=', date),
|
||||||
'to_date': ('>=', date),
|
'to_date': ('>=', date),
|
||||||
'leave_type': allocation.leave_type,
|
'leave_type': allocation.leave_type,
|
||||||
'employee': employee
|
'employee': employee,
|
||||||
|
'docstatus': 1
|
||||||
}, 'SUM(total_leaves_allocated)') or 0
|
}, 'SUM(total_leaves_allocated)') or 0
|
||||||
|
|
||||||
remaining_leaves = get_leave_balance_on(employee, d, date, to_date = allocation.to_date,
|
remaining_leaves = get_leave_balance_on(employee, d, date, to_date = allocation.to_date,
|
||||||
@@ -791,4 +792,4 @@ def get_leave_approver(employee):
|
|||||||
leave_approver = frappe.db.get_value('Department Approver', {'parent': department,
|
leave_approver = frappe.db.get_value('Department Approver', {'parent': department,
|
||||||
'parentfield': 'leave_approvers', 'idx': 1}, 'approver')
|
'parentfield': 'leave_approvers', 'idx': 1}, 'approver')
|
||||||
|
|
||||||
return leave_approver
|
return leave_approver
|
||||||
|
|||||||
Reference in New Issue
Block a user