From 21353e54c20cd8135be3b69b5285742af59ae389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NASSIET?= Date: Wed, 20 Jul 2022 21:56:12 +0200 Subject: [PATCH] correction warning php Undefined property: stdClass:: in /space/www/v16/htdocs/societe/index.php on line 181 lorsque le module fournisseur n'est pas actif en se rendant sur le module Tiers --- htdocs/societe/index.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index f4637186b4d..d23fa01fd35 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -178,10 +178,12 @@ if (!empty($conf->use_javascript_ajax) && ((round($third['prospect']) ? 1 : 0) + $statstring .= ""; } $statstring2 = ''; - if (((isModEnabled('societe') && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled('supplier_order') && $user->rights->supplier_order->lire) || (isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) { - $statstring2 = ""; - $statstring2 .= ''.$langs->trans("Suppliers").''.round($third['supplier']).''; - $statstring2 .= ""; + if (isModEnabled('fournisseur')) { + if (((isModEnabled('societe') && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled('supplier_order') && $user->rights->supplier_order->lire) || (isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) { + $statstring2 = ""; + $statstring2 .= ''.$langs->trans("Suppliers").''.round($third['supplier']).''; + $statstring2 .= ""; + } } $thirdpartygraph .= $statstring; $thirdpartygraph .= $statstring2;