From e0ba32136572aabdad39e43a5bd414e980bf897a Mon Sep 17 00:00:00 2001 From: habot-it Date: Sun, 30 Jan 2022 13:38:00 +0000 Subject: [PATCH] Add parent company in action==add of societe card.php --- htdocs/societe/card.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 43e9bb30314..10edb21483e 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -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 ''; print ''; + // Parent company + if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY)) { + print ''; + print ''.$langs->trans('ParentCompany').''; + print ''; + print img_picto('', 'company', 'class="paddingrightonly"'); + print $form->select_thirdparty_list('', 'parent_company_id', '', $langs->trans("ThirdParty")); + print ''; + } + // Prospect/Customer print ''.$form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1).''; print '';