fix: update filters

This commit is contained in:
Anurag Mishra
2020-09-08 15:55:07 +05:30
committed by GitHub
parent 69bb85d1d0
commit e5fbebf946

View File

@@ -433,7 +433,8 @@ def get_leave_details(employee, date):
'from_date': ('<=', date),
'to_date': ('>=', date),
'leave_type': allocation.leave_type,
'employee': employee
'employee': employee,
'docstatus': 1
}, 'SUM(total_leaves_allocated)') or 0
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,
'parentfield': 'leave_approvers', 'idx': 1}, 'approver')
return leave_approver
return leave_approver