ERPNext Conference 2019* ERPNext.com Blog

(V12) Employee leave balance report is reporting wrong leave balance if employee has taken half day leave


#1

The half day leave which has been taken by employee is taken as full day leave by the report.

I looked at the code in leave_application.py, the function get_leaves_for_period doesn’t seem to be considering half day leave at all. It simply:

		leave_days += get_number_of_leave_days(employee, leave_type,
			leave_entry.from_date, leave_entry.to_date) * -1

And those employees who have taken half day leaves are having wrong leave balance.


Leave application, incorrect used leaves
#2

You may want to review this


#3

I have tried out the fix and it works. When will the fix be implemented?