From 0ef3801eba69718a0df107ae93198f40dac9c3e6 Mon Sep 17 00:00:00 2001 From: Milen Karaganski Date: Tue, 13 Dec 2022 11:57:34 +0200 Subject: [PATCH] FIX|Fix [#23202] Fix for V17 Parent company field missing when editing third party --- htdocs/societe/card.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 5d72fed725f..e18f6987a33 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1986,6 +1986,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->town = GETPOST('town', 'alphanohtml'); $object->country_id = GETPOST('country_id') ?GETPOST('country_id', 'int') : $mysoc->country_id; $object->state_id = GETPOST('state_id', 'int'); + $object->parent = GETPOST('parent_company_id', 'int'); $object->socialnetworks = array(); if (isModEnabled('socialnetworks')) { @@ -2614,6 +2615,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3'); include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; + // Parent company + if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY)) { + print ''; + print ''.$langs->trans('ParentCompany').''; + print ''; + print img_picto('', 'company', 'class="paddingrightonly"'); + print $form->select_company(GETPOST('parent_company_id') ? GETPOST('parent_company_id') : $object->parent, 'parent_company_id', '', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); + print ''; + } + // Webservices url/key if (!empty($conf->syncsupplierwebservices->enabled)) { print ''.$form->editfieldkey('WebServiceURL', 'webservices_url', '', $object, 0).'';