From 7177bc09263d4d7f716e79dcf3e49f422e5ad005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NASSIET?= Date: Wed, 20 Jul 2022 22:07:42 +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, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index d23fa01fd35..a13d8a3de99 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -178,12 +178,10 @@ if (!empty($conf->use_javascript_ajax) && ((round($third['prospect']) ? 1 : 0) + $statstring .= ""; } $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 .= ""; - } + if (((isModEnabled('fournisseur') && $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;