diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index 384e30f8b120209c03f602658260a64720d4ad0a..d314af73cd17e6627f0e190fa9460324dcbd5d64 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -25,6 +25,7 @@ include_once(DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"); + /** * Class to manage the box to show last task */ @@ -36,6 +37,7 @@ class box_task extends ModeleBoxes //var $depends = array("projet"); var $db; var $param; + var $enabled = 0; // Disabled because bugged. var $info_box_head = array(); var $info_box_contents = array(); @@ -79,8 +81,8 @@ class box_task extends ModeleBoxes // list the summary of the orders if ($user->rights->projet->lire) { - - $sql = "SELECT pt.fk_statut, count(pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot"; + // FIXME fk_statut on a task is not be used. We use the percent. This means this box is useless. + $sql = "SELECT pt.fk_statut, count(DISTINCT pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot"; $sql.= " FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt"; $sql.= " WHERE pt.datec BETWEEN '".$this->db->idate(dol_get_first_day(date("Y"), 1))."' AND '".$this->db->idate(dol_get_last_day(date("Y"), 12))."'"; $sql.= " AND pt.rowid = ptt.fk_task";