Exemplo n.º 1
0
                             $apm_obj->Save();
                         }
                     }
                 }
             }
             unset($data['milestone_rows'][$apm_id]);
         }
         unset($apm_id);
     }
     Redirect::Page(URLBuilder::getURL(array('id' => $data['id']), 'EditAccrualPolicy.php'));
     break;
 case 'submit':
     //Debug::setVerbosity(11);
     Debug::Text('Submit!', __FILE__, __LINE__, __METHOD__, 10);
     $redirect = 0;
     $apf->StartTransaction();
     $apf->setId($data['id']);
     $apf->setCompany($current_company->getId());
     $apf->setName($data['name']);
     $apf->setType($data['type_id']);
     if (isset($data['enable_pay_stub_balance_display'])) {
         $apf->setEnablePayStubBalanceDisplay(TRUE);
     } else {
         $apf->setEnablePayStubBalanceDisplay(FALSE);
     }
     $apf->setApplyFrequency($data['apply_frequency_id']);
     $apf->setApplyFrequencyMonth($data['apply_frequency_month']);
     $apf->setApplyFrequencyDayOfMonth($data['apply_frequency_day_of_month']);
     $apf->setApplyFrequencyDayOfWeek($data['apply_frequency_day_of_week']);
     if (isset($data['milestone_rollover_hire_date'])) {
         $apf->setMilestoneRolloverHireDate(TRUE);