diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 4231160b64f..0c3679adac5 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1960,7 +1960,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead */ function top_menu_user($hideloginname = 0, $urllogout = '') { - global $langs, $conf, $db, $hookmanager, $user; + global $langs, $conf, $db, $hookmanager, $user, $mysoc; global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; @@ -1985,13 +1985,27 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $dropdownBody .= ' '.$langs->trans("ShowCompanyInfos").''; $dropdownBody .= '
'; - if (!empty($conf->global->MAIN_INFO_SIREN)) $dropdownBody .= '
'.$langs->transcountry("ProfId1Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIREN).''; - if (!empty($conf->global->MAIN_INFO_SIRET)) $dropdownBody .= '
'.$langs->transcountry("ProfId2Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIRET).''; - if (!empty($conf->global->MAIN_INFO_APE)) $dropdownBody .= '
'.$langs->transcountry("ProfId3Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_APE).''; - if (!empty($conf->global->MAIN_INFO_RCS)) $dropdownBody .= '
'.$langs->transcountry("ProfId4Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_RCS).''; - if (!empty($conf->global->MAIN_INFO_PROFID5)) $dropdownBody .= '
'.$langs->transcountry("ProfId5Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID5).''; - if (!empty($conf->global->MAIN_INFO_PROFID6)) $dropdownBody .= '
'.$langs->transcountry("ProfId6Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID6).''; - if (!empty($conf->global->MAIN_INFO_TVAINTRA)) $dropdownBody .= '
'.$langs->trans("VATIntraShort").': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_TVAINTRA).''; + if (!empty($conf->global->MAIN_INFO_SIREN)) { + $dropdownBody .= '
'.$langs->transcountry("ProfId1Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIREN).''; + } + if (!empty($conf->global->MAIN_INFO_SIRET)) { + $dropdownBody .= '
'.$langs->transcountry("ProfId2Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIRET).''; + } + if (!empty($conf->global->MAIN_INFO_APE)) { + $dropdownBody .= '
'.$langs->transcountry("ProfId3Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_APE).''; + } + if (!empty($conf->global->MAIN_INFO_RCS)) { + $dropdownBody .= '
'.$langs->transcountry("ProfId4Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_RCS).''; + } + if (!empty($conf->global->MAIN_INFO_PROFID5)) { + $dropdownBody .= '
'.$langs->transcountry("ProfId5Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID5).''; + } + if (!empty($conf->global->MAIN_INFO_PROFID6)) { + $dropdownBody .= '
'.$langs->transcountry("ProfId6Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID6).''; + } + if (!empty($conf->global->MAIN_INFO_TVAINTRA)) { + $dropdownBody .= '
'.$langs->trans("VATIntraShort").': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_TVAINTRA).''; + } $dropdownBody .= '
';