if (isset($exception_data['grace']) and $exception_data['grace'] != '') { $epf->setGrace($exception_data['grace']); } if (isset($exception_data['watch_window']) and $exception_data['watch_window'] != '') { $epf->setWatchWindow($exception_data['watch_window']); } if ($epf->isValid()) { $epf->Save(); } } } Redirect::Page(URLBuilder::getURL(NULL, 'ExceptionPolicyControlList.php')); break; } default: $type_options = $epf->getTypeOptions($current_company->getProductEdition()); if (isset($id) and $id != '') { BreadCrumb::setCrumb($title); $epclf = new ExceptionPolicyControlListFactory(); $epclf->getByIdAndCompanyID($id, $current_company->getID()); foreach ($epclf as $epc_obj) { //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10); $eplf = new ExceptionPolicyListFactory(); $eplf->getByExceptionPolicyControlID($id); if ($eplf->getRecordCount() > 0) { foreach ($eplf as $ep_obj) { if (isset($type_options[$ep_obj->getType()])) { $ep_objs[$ep_obj->getType()] = $ep_obj; } else { //Delete exceptions that aren't part of the product. Debug::Text('Deleting exception outside product edition: ' . $ep_obj->getID(), __FILE__, __LINE__, __METHOD__, 10);