diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php
index bc8928bdc6e..c0ec385cff6 100644
--- a/htdocs/margin/tabs/thirdpartyMargins.php
+++ b/htdocs/margin/tabs/thirdpartyMargins.php
@@ -109,7 +109,7 @@ if ($socid > 0)
print '';
}
- if ($object->fournisseur)
+ if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire))
{
print '
| ';
print $langs->trans('SupplierCode').' | ';
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 876300aef28..4807591b9f3 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -2021,10 +2021,13 @@ else
print $object->getLibCustProspStatut();
print ' |
';
- // Prospect/Customer
- print '| '.$langs->trans('Supplier').' | ';
- print yn($object->fournisseur);
- print ' |
';
+ // Supplier
+ if (! empty($conf->fournisseur->enabled))
+ {
+ print '| '.$langs->trans('Supplier').' | ';
+ print yn($object->fournisseur);
+ print ' |
';
+ }
// Prefix
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php
index 697ae315fb3..5733ffa9568 100644
--- a/htdocs/societe/notify/card.php
+++ b/htdocs/societe/notify/card.php
@@ -180,7 +180,7 @@ if ($result > 0)
print '';
}
- if ($object->fournisseur)
+ if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire))
{
print '| ';
print $langs->trans('SupplierCode').' | ';
|