diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 10c13d0313f..ea99b9c9eef 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2729,7 +2729,12 @@ class Societe extends CommonObject
if (isModEnabled('categorie') && !$nofetch) {
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$form = new Form($this->db);
- $datas['categories'] = '
' . $form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1);
+ if ($this->client) {
+ $datas['categories_customer'] = '
' . $form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1);
+ }
+ if ($this->fournisseur) {
+ $datas['categories_supplier'] = '
' . $form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1);
+ }
}
$datas['divclose'] = '';