}
     if (isset($udt_data['quantity'])) {
         $udtf->setQuantity($udt_data['quantity']);
     }
     if (isset($udt_data['bad_quantity'])) {
         $udtf->setBadQuantity($udt_data['bad_quantity']);
     }
     $udtf->setOverTimePolicyID($udt_data['over_time_policy_id']);
     $udtf->setPremiumPolicyID($udt_data['premium_policy_id']);
     $udtf->setAbsencePolicyID($udt_data['absence_policy_id']);
     $udtf->setMealPolicyID($udt_data['meal_policy_id']);
     $udtf->setTotalTime($udt_data['total_time']);
     $udtf->setPunchControlID((int) $udt_data['punch_control_id']);
     if (isset($udt_data['override']) and $udt_data['override'] == 1) {
         Debug::Text('Setting override to TRUE!', __FILE__, __LINE__, __METHOD__, 10);
         $udtf->setOverride(TRUE);
     } else {
         $udtf->setOverride(FALSE);
     }
     if ($udtf->isValid()) {
         $udtf->setEnableCalcSystemTotalTime(TRUE);
         $udtf->setEnableCalcWeeklySystemTotalTime(TRUE);
         $udtf->setEnableCalcException(TRUE);
         $udtf->Save();
         Redirect::Page(URLBuilder::getURL(array('refresh' => TRUE), '../CloseWindow.php'));
         break;
     }
 default:
     if ($id != '') {
         Debug::Text(' ID was passed: ' . $id, __FILE__, __LINE__, __METHOD__, 10);
         $udtlf = new UserDateTotalListFactory();