//Open } else { $ppf->setId($data['id']); } $ppf->setPayPeriodSchedule($data['pay_period_schedule_id']); if (is_object($ppf->getPayPeriodScheduleObject())) { $ppf->getPayPeriodScheduleObject()->setPayPeriodTimeZone(); } $ppf->setStartDate($data['start_date']); $ppf->setEndDate($data['end_date'] + 59); $ppf->setTransactionDate($data['transaction_date'] + 59); if (isset($data['advance_end_date'])) { $ppf->setAdvanceEndDate($data['advance_end_date']); } if (isset($data['advance_transaction_date'])) { $ppf->setAdvanceTransactionDate($data['advance_transaction_date']); } $ppf->setEnableImportData(TRUE); //Import punches when creating new pay periods. if ($ppf->isValid()) { $ppf->Save(); $ppf->CommitTransaction(); Redirect::Page(URLBuilder::getURL(array('id' => $data['pay_period_schedule_id']), 'PayPeriodList.php')); break; } $ppf->FailTransaction(); default: if (isset($id)) { BreadCrumb::setCrumb($title); $pplf = new PayPeriodListFactory(); $pplf->getByIdAndCompanyId($id, $current_company->getId());