Merge pull request #5077 from frappe/master

Master
This commit is contained in:
Rushabh Mehta
2016-03-29 11:59:32 +05:30
7 changed files with 20 additions and 17 deletions

View File

@@ -94,7 +94,11 @@ class MaintenanceSchedule(TransactionBase):
validated = False
employee = frappe.db.get_value("Sales Person", sales_person, "employee")
holiday_list = get_holiday_list_for_employee(employee)
if employee:
holiday_list = get_holiday_list_for_employee(employee)
else:
holiday_list = frappe.db.get_value("Company", self.company, "default_holiday_list")
holidays = frappe.db.sql_list('''select holiday_date from `tabHoliday` where parent=%s''', holiday_list)
if not validated and holidays: