Beispiel #1
0
}
$smarty->assign('title', TTi18n::gettext($title = 'Edit Company'));
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'id', 'company_data')));
$cf = new CompanyFactory();
$action = Misc::findSubmitButton();
switch ($action) {
    case 'submit':
        //Debug::setVerbosity( 11 );
        Debug::Text('Submit!', __FILE__, __LINE__, __METHOD__, 10);
        $cf->StartTransaction();
        if ($permission->Check('company', 'edit')) {
            $cf->setId($company_data['id']);
            $cf->setParent($company_data['parent']);
            $cf->setStatus($company_data['status']);
        } else {
            $cf->setId($current_company->getId());
        }
        $cf->setProductEdition($company_data['product_edition']);
        if (isset($company_data['name'])) {
            $cf->setName($company_data['name']);
        }
        $cf->setShortName($company_data['short_name']);
        $cf->setBusinessNumber($company_data['business_number']);
        $cf->setOriginatorID($company_data['originator_id']);
        $cf->setDataCenterID($company_data['data_center_id']);
        $cf->setAddress1($company_data['address1']);
        $cf->setAddress2($company_data['address2']);