} else { if (tep_not_null($administration_project->has_employees_roles('employees_roles_start_date', '<', tep_strftime(DATE_FORMAT_DATABASE, $_POST['projects_start_date']), 'AND', 'employees_roles_end_date', '>=', tep_strftime(DATE_FORMAT_DATABASE, $_POST['projects_start_date'])))) { $_POST['question_er1_answer'] = true; // Employees-Roles start date will change // Check tariffs if (tep_not_null($administration_project->has_tariffs('tariffs_end_date', '<', tep_strftime(DATE_FORMAT_DATABASE, $_POST['projects_start_date'])))) { $_POST['action'] = 'enter_data'; $error_level = 8; // Tariff end date before new start date break; } else { if (tep_not_null($administration_project->has_tariffs('tariffs_start_date', '<', tep_strftime(DATE_FORMAT_DATABASE, $_POST['projects_start_date']), 'AND', 'tariffs_end_date', '>=', tep_strftime(DATE_FORMAT_DATABASE, $_POST['projects_start_date'])))) { $_POST['question_t1_answer'] = true; // Tariffs start date will change // Check if activities exist before new start date if (tep_not_null($administration_project->has_activities('activities_date', '<', tep_strftime(DATE_FORMAT_DATABASE, $_POST['projects_start_date'])))) { $_POST['action'] = 'enter_data'; $error_level = 9; // Activities exist before new start date (thus between old and new start date) break; } } } } } } } /*******************************************/ /*** Second do the end date check series ***/ /*******************************************/ if ($_POST['projects_end_date'] != $administration_project->end_date) {