diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 655d474aef3..e55766c377e 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -3232,10 +3232,14 @@ abstract class CommonObject
if (! $user->rights->margins->liretous) return;
- $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
+ $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
$marginInfo = $this->getMarginInfos($force_price);
- print "";
+ if ($conf->global->MARGININFO_HIDE_SHOW > 0)
+ print "
";
+ if ($conf->global->MARGININFO_HIDE_SHOW == 2) // hide by default
+ print '';
+
print '
| '.$langs->trans('Margins').' | ';