Merge pull request #16219 from Zlash65/fix-holiday-leave

[Minor] Fix Leave Application as half day on Holiday validation
This commit is contained in:
rohitwaghchaure 2018-12-17 13:54:16 +05:30 committed by GitHub
commit d6ca23b277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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