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;