diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php
index 3609c10bfd1..ee75a51ac43 100644
--- a/htdocs/compta/paiement/card.php
+++ b/htdocs/compta/paiement/card.php
@@ -367,7 +367,7 @@ if ($resql) {
print '
'.$langs->trans('Entity').' | ';
}
//Add Margin
- if (!empty($conf->margin->enabled)) {
+ if (!empty($conf->margin->enabled) && getDolGlobalInt('MARGIN_SHOW_MARGIN_ON_PAYMENT')) {
print ''.$langs->trans('Margin').' | ';
}
print ''.$langs->trans('ExpectedToPay').' | ';
@@ -386,7 +386,7 @@ if ($resql) {
$invoice->fetch($objp->facid);
// Add Margin
- if (!empty($conf->margin->enabled)) {
+ if (!empty($conf->margin->enabled) && getDolGlobalInt('MARGIN_SHOW_MARGIN_ON_PAYMENT')) {
$formmargin = new FormMargin($db);
$marginInfo = array();
$invoice->fetch_lines();
@@ -420,7 +420,7 @@ if ($resql) {
}
// Add margin
- if (!empty($conf->margin->enabled)) {
+ if (!empty($conf->margin->enabled) && getDolGlobalInt('MARGIN_SHOW_MARGIN_ON_PAYMENT')) {
print ''.price($marginInfo['total_margin']).' | ';
}