$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()); } } //Select box options; $company_data['status_options'] = $cf->getOptions('status'); $company_data['country_options'] = $cf->getOptions('country'); //Company list. $company_data['company_list_options'] = CompanyListFactory::getAllArray(); $company_data['product_edition_options'] = $cf->getOptions('product_edition'); if (!isset($id) and isset($company_data['id'])) { $id = $company_data['id']; } $company_data['user_list_options'] = UserListFactory::getByCompanyIdArray($id); $smarty->assign_by_ref('company_data', $company_data); break; } $smarty->assign_by_ref('cf', $cf); $smarty->display('company/EditCompany.tpl');