Can show technical ID of any object in banner.

This commit is contained in:
Laurent Destailleur 2020-04-01 16:51:45 +02:00
parent 33d2b61c19
commit 4727800206

View File

@ -1660,7 +1660,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$morehtmlref .= '</div>';
}
}
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && in_array($object->element, array('societe', 'contact', 'member', 'product')))
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && ($conf->global->MAIN_SHOW_TECHNICAL_ID == '1' || preg_match('/'.preg_quote($object->element, '/').'/i', $conf->global->MAIN_SHOW_TECHNICAL_ID)) && ! empty($object->id))
{
$morehtmlref .= '<div style="clear: both;"></div><div class="refidno">';
$morehtmlref .= $langs->trans("TechnicalID").': '.$object->id;