Fix: Initialisation 0 des stats

This commit is contained in:
Laurent Destailleur 2007-01-03 01:50:29 +00:00
parent e35b8844a0
commit 3bced4ce63
3 changed files with 5 additions and 4 deletions

View File

@ -91,7 +91,7 @@ class Client extends Societe
{
global $conf, $user;
$this->nb=array();
$this->nb=array("customers" => 0,"prospects" => 0);
$sql = "SELECT count(s.idp) as nb, s.client";
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";

View File

@ -127,7 +127,7 @@ if ($user->societe_id == 0)
$conf->telephonie->enabled && $user->rights->telephonie->lire);
// Fichier des classes qui contiennent la methode load_state_board pour chaque ligne
$includes=array(DOL_DOCUMENT_ROOT."/client.class.php",
DOL_DOCUMENT_ROOT."/client.class.php",
DOL_DOCUMENT_ROOT."/prospect.class.php",
DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php",
DOL_DOCUMENT_ROOT."/adherents/adherent.class.php",
DOL_DOCUMENT_ROOT."/product.class.php",
@ -135,7 +135,7 @@ if ($user->societe_id == 0)
DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php");
// Nom des classes qui contiennent la methode load_state_board pour chaque ligne
$classes=array('Client',
'Client',
'Prospect',
'Fournisseur',
'Adherent',
'Product',
@ -184,6 +184,7 @@ if ($user->societe_id == 0)
if (! is_object($boardloaded[$classe]))
{
include_once($includes[$key]);
$board=new $classe($db);
$board->load_state_board($user);
$boardloaded[$classe]=$board;

View File

@ -65,7 +65,7 @@ class Prospect extends Societe
{
global $conf, $user;
$this->nb=array();
$this->nb=array("customers" => 0,"prospects" => 0);
$sql = "SELECT count(s.idp) as nb, s.client";
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";