From c17463d2f4ec4a1c8f419c511b04b7db9e2e41f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 12 Feb 2023 22:03:39 +0100 Subject: [PATCH] clean code --- htdocs/societe/class/societe.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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'] = '';