half_day enable/disable check (#14795)

This commit is contained in:
Zarrar 2018-07-03 17:00:38 +05:30 committed by Rushabh Mehta
parent 205eae322b
commit 68a148e293

View File

@ -355,7 +355,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, half_day_date = None):
number_of_days = 0
if half_day == 1:
if cint(half_day) == 1:
if from_date == to_date:
number_of_days = 0.5
else: