Total leave days gets updated on date change

This commit is contained in:
Kanchan Chauhan 2016-10-22 11:55:51 +05:30
parent 44e9195378
commit a084405bca

View File

@ -279,7 +279,7 @@ def get_approvers(doctype, txt, searchfield, start, page_len, filters):
@frappe.whitelist()
def get_number_of_leave_days(employee, leave_type, from_date, to_date, half_day=None):
if half_day:
if half_day==1:
return 0.5
number_of_days = date_diff(to_date, from_date) + 1
if not frappe.db.get_value("Leave Type", leave_type, "include_holiday"):