Add parent company in action==add of societe card.php

This commit is contained in:
habot-it 2022-01-30 13:38:00 +00:00
parent 7f13561158
commit e0ba321365

View File

@ -453,6 +453,7 @@ if (empty($reshook)) {
}
$object->entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity);
$object->name_alias = GETPOST('name_alias', 'alphanohtml');
$object->parent = GETPOST('parent_company_id', 'int');
$object->address = GETPOST('address', 'alphanohtml');
$object->zip = GETPOST('zipcode', 'alphanohtml');
$object->town = GETPOST('town', 'alphanohtml');
@ -1312,6 +1313,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr id="name_alias"><td><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>';
print '<td colspan="3"><input type="text" class="minwidth300" name="name_alias" id="name_alias_input" value="'.dol_escape_htmltag($object->name_alias).'"></td></tr>';
// Parent company
if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY)) {
print '<tr>';
print '<td>'.$langs->trans('ParentCompany').'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
print img_picto('', 'company', 'class="paddingrightonly"');
print $form->select_thirdparty_list('', 'parent_company_id', '', $langs->trans("ThirdParty"));
print '</td></tr>';
}
// Prospect/Customer
print '<tr><td class="titlefieldcreate">'.$form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1).'</td>';
print '<td class="maxwidthonsmartphone">';