Merge pull request #6678 from KanchanChauhan/total-leave-days-updated

Total leave days gets updated on date change
This commit is contained in:
Nabin Hait 2016-10-24 11:13:31 +05:30 committed by GitHub
commit 8918dcf54e

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"):