Merge pull request #16219 from Zlash65/fix-holiday-leave
[Minor] Fix Leave Application as half day on Holiday validation
This commit is contained in:
commit
d6ca23b277
@ -187,7 +187,7 @@ class LeaveApplication(Document):
|
||||
self.total_leave_days = get_number_of_leave_days(self.employee, self.leave_type,
|
||||
self.from_date, self.to_date, self.half_day, self.half_day_date)
|
||||
|
||||
if self.total_leave_days == 0:
|
||||
if self.total_leave_days <= 0:
|
||||
frappe.throw(_("The day(s) on which you are applying for leave are holidays. You need not apply for leave."))
|
||||
|
||||
if not is_lwp(self.leave_type):
|
||||
|
Loading…
x
Reference in New Issue
Block a user