mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
[minor] fix holiday_list validation
This commit is contained in:
@@ -34,7 +34,7 @@ class HolidayList(Document):
|
|||||||
throw(_("To Date cannot be before From Date"))
|
throw(_("To Date cannot be before From Date"))
|
||||||
|
|
||||||
for day in self.get("holidays"):
|
for day in self.get("holidays"):
|
||||||
if not (self.from_date <= day.holiday_date <= self.to_date):
|
if not (getdate(self.from_date) <= getdate(day.holiday_date) <= getdate(self.to_date)):
|
||||||
frappe.throw(_("The holiday on {0} is not between From Date and To Date").format(formatdate(day.holiday_date)))
|
frappe.throw(_("The holiday on {0} is not between From Date and To Date").format(formatdate(day.holiday_date)))
|
||||||
|
|
||||||
def get_weekly_off_date_list(self, start_date, end_date):
|
def get_weekly_off_date_list(self, start_date, end_date):
|
||||||
|
|||||||
Reference in New Issue
Block a user