Total leave days gets updated on date change
This commit is contained in:
parent
44e9195378
commit
a084405bca
@ -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"):
|
||||
|
Loading…
Reference in New Issue
Block a user