From a12972034fd93f80d1d58ee97c3b0af99eb0e480 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Fri, 18 Jan 2013 13:56:36 +0100 Subject: [PATCH] Fix: Start to fix some bugs --- htdocs/core/boxes/box_activity.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index fe757f19699..044765f302a 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -37,7 +37,7 @@ class box_activity extends ModeleBoxes var $db; var $param; var $enabled = 1; - + var $info_box_head = array(); var $info_box_contents = array(); @@ -54,8 +54,8 @@ class box_activity extends ModeleBoxes $langs->load("orders"); $this->boxlabel = $langs->transnoentitiesnoconv("BoxGlobalActivity"); - - // Disabled by default because, still has some bug (pgsl support, filters) and slow down seriously Dolibarr + + // Disabled by default because, still has some bug (pgsl support, filters) and slow down seriously Dolibarr $this->enabled = (! empty($conf->global->MAIN_FEATURES_LEVEL) || ! empty($conf->global->MAIN_BOX_ACTIVITY_ENABLED)); } @@ -154,9 +154,9 @@ class box_activity extends ModeleBoxes $sql.= " AND c.fk_soc = s.rowid"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; - $sql.= " AND c.datec between '".$db->idate(dol_get_first_day(date("Y"),1,1))."' AND '".$db->idate(dol_get_last_day(date("Y"),12,1))."'"; + $sql.= " AND c.date_commande between '".$db->idate(dol_get_first_day(date("Y"),1,1))."' AND '".$db->idate(dol_get_last_day(date("Y"),12,1))."'"; $sql.= " AND c.facture=0"; - $sql.= " GROUP BY c.fk_statut"; + $sql.= " GROUP BY c.fk_statut,c.facture"; $sql.= " ORDER BY c.fk_statut DESC"; $result = $db->query($sql); -- GitLab