$cf->setEnableAddStation(TRUE); $cf->setEnableAddPayStubEntryAccountPreset(TRUE); $cf->setEnableAddRecurringHolidayPreset(TRUE); } if ($cf->isValid()) { $cf->Save(); //$cf->FailTransaction(); $cf->CommitTransaction(); if ($permission->Check('company', 'edit')) { Redirect::Page(URLBuilder::getURL(NULL, 'CompanyList.php')); } else { Redirect::Page(URLBuilder::getURL(NULL, '../index.php')); } break; } $cf->FailTransaction(); default: if (isset($id)) { BreadCrumb::setCrumb($title); $clf = new CompanyListFactory(); if ($permission->Check('company', 'edit')) { $clf->GetByID($id); } else { $id = $current_company->getId(); $clf->GetByID($id); } foreach ($clf as $company) { //Debug::Arr($company,'Company', __FILE__, __LINE__, __METHOD__,10); $company_data = array('id' => $company->getId(), 'parent' => $company->getParent(), 'status' => $company->getStatus(), 'product_edition' => $company->getProductEdition(), 'name' => $company->getName(), 'short_name' => $company->getShortName(), 'business_number' => $company->getBusinessNumber(), 'originator_id' => $company->getOriginatorID(), 'data_center_id' => $company->getDataCenterID(), 'address1' => $company->getAddress1(), 'address2' => $company->getAddress2(), 'city' => $company->getCity(), 'province' => $company->getProvince(), 'country' => $company->getCountry(), 'postal_code' => $company->getPostalCode(), 'work_phone' => $company->getWorkPhone(), 'fax_phone' => $company->getFaxPhone(), 'admin_contact' => $company->getAdminContact(), 'billing_contact' => $company->getBillingContact(), 'support_contact' => $company->getSupportContact(), 'logo_file_name' => $company->getLogoFileName(NULL, FALSE), 'enable_second_last_name' => $company->getEnableSecondLastName(), 'created_date' => $company->getCreatedDate(), 'created_by' => $company->getCreatedBy(), 'updated_date' => $company->getUpdatedDate(), 'updated_by' => $company->getUpdatedBy(), 'deleted_date' => $company->getDeletedDate(), 'deleted_by' => $company->getDeletedBy()); } }