diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 4b25431112c..0480dbf6e19 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -88,11 +88,12 @@ if ($result) { while ($objp = $db->fetch_object($result)) { - if ($objp->client == 1 || $objp->client == 3) $third['customer']++; - if ($objp->client == 2 || $objp->client == 3) $third['prospect']++; - if ($objp->fournisseur) $third['supplier']++; + $found=0; + if ($objp->client == 1 || $objp->client == 3) { $found=1; $third['customer']++; } + if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($objp->client == 2 || $objp->client == 3)) { $found=1; $third['prospect']++; } + if ($conf->fournisseur->enabled && $objp->fournisseur) { $found=1; $third['supplier']++; } - $total++; + if ($found) $total++; } } else dol_print_error($db); @@ -103,22 +104,22 @@ if ($conf->societe->enabled) { if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { - $statProducts = "