fix: Form dashboard showing wrong balance

This commit is contained in:
Anurag Mishra
2020-08-25 06:55:02 +05:30
parent 51c29cafee
commit 69bb85d1d0

View File

@@ -433,6 +433,7 @@ 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
}, '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,