From d8075d8e66aaf2fad25809da0c6afa6efc264593 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 May 2011 18:54:25 +0000 Subject: [PATCH] New: First add of js graph --- htdocs/societe/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index d70b2fcb3cd..0463737be9a 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -89,7 +89,7 @@ if ($result) while ($objp = $db->fetch_object($result)) { $found=0; - if ($objp->client == 1 || $objp->client == 3) { $found=1; $third['customer']++; } + if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && ($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']++; } @@ -100,7 +100,7 @@ else dol_print_error($db); print ''; print ''; -if ($conf->use_javascript_ajax) +if ($conf->use_javascript_ajax && ((round($third['prospect'])?1:0)+(round($third['customer'])?1:0)+(round($third['supplier'])?1:0) >= 2)) { print '
'.$langs->trans("Statistics").'
'; $data=array();