diff --git a/htdocs/includes/boxes/box_clients.php b/htdocs/includes/boxes/box_clients.php index 9af751fb3e2..2786c3ff3c4 100644 --- a/htdocs/includes/boxes/box_clients.php +++ b/htdocs/includes/boxes/box_clients.php @@ -85,6 +85,8 @@ class box_clients extends ModeleBoxes { if ($result) { $num = $db->num_rows($result); + if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url= DOL_URL_ROOT."/comm/fiche.php?socid="; + else $url= DOL_URL_ROOT."/societe/soc.php?socid="; $i = 0; while ($i < $num) @@ -95,11 +97,11 @@ class box_clients extends ModeleBoxes { $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => $url.$objp->socid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->nom, - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => $url.$objp->socid); $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day")); diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index cf395183c8b..5cb4dfa7429 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -89,9 +89,9 @@ if ($result) while ($objp = $db->fetch_object($result)) { $found=0; - 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']++; } + if ($conf->societe->enabled && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS) && ($objp->client == 1 || $objp->client == 3)) { $found=1; $third['customer']++; } + if ($conf->societe->enabled && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS) && ($objp->client == 2 || $objp->client == 3)) { $found=1; $third['prospect']++; } + if ($conf->fournisseur->enabled && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $objp->fournisseur) { $found=1; $third['supplier']++; } if ($found) $total++; } @@ -104,28 +104,28 @@ if ($conf->use_javascript_ajax && ((round($third['prospect'])?1:0)+(round($third { print '