diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1b1466a664c..8b9e210b4f9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2632,7 +2632,7 @@ abstract class CommonObject */ function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0, $hookmanager=false) { - global $conf,$langs; + global $conf,$langs,$user; print ''; if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) @@ -2646,7 +2646,7 @@ abstract class CommonObject print ' '; print ''.$langs->trans('Qty').''; print ''.$langs->trans('ReductionShort').''; - if (! empty($conf->margin->enabled)) { + if (! empty($conf->margin->enabled) && empty($user->societe_id)) { if ($conf->global->MARGIN_TYPE == "1") print ''.$langs->trans('BuyingPrice').''; else @@ -3044,7 +3044,8 @@ abstract class CommonObject } function displayMarginInfos($force_price=false) { - global $langs, $conf; + global $langs, $conf,$user; + if (! empty($user->societe_id)) return; $marginInfo = $this->getMarginInfos($force_price); print ''; print ''; diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index abaef7a1910..75620334a08 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -117,7 +117,7 @@ margin->enabled)) { + if (! empty($conf->margin->enabled) && empty($user->societe_id)) { ?> global->DISPLAY_MARGIN_RATES)) {?>
  pa_ht); ?>