diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index 29bdd16b21e..1d4d1f8f0ca 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -50,6 +50,7 @@ if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="f.datef"; $object = new Societe($db); +if ($socid > 0) $object->fetch($socid); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('thirdpartymargins','globalcard')); @@ -72,8 +73,10 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e $invoicestatic=new Facture($db); $form = new Form($db); +$title=$langs->trans("ThirdParty").' - '.$langs->trans("Margins"); +if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Files"); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('',$langs->trans("ThirdParty").' - '.$langs->trans("Margins"),$help_url); +llxHeader('',$title,$help_url); if ($socid > 0) { diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 156a4620634..5c9bc15328f 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -57,8 +57,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, $form = new Form($db); +$title=$langs->trans("ThirdParty").' - '.$langs->trans("Notes"); +if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Files"); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('',$langs->trans("ThirdParty").' - '.$langs->trans("Notes"),$help_url); +llxHeader('',$title,$help_url); if ($id > 0) {