Merge pull request #23131 from Anurag810/leave_application_form_dashboard_fixes

fix: Form dashboard showing wrong balance
This commit is contained in:
rohitwaghchaure
2020-09-08 16:58:11 +05:30
committed by GitHub

View File

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