Skip to content
Snippets Groups Projects
Commit d644a3bc authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge remote-tracking branch 'origin/3.8' into 3.9

parents 5453f99e 1038e923
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,10 @@ $langs->load("projects");
*/
$now = dol_now();
$tmp=dol_getdate($now);
$day=$tmp['mday'];
$month=$tmp['mon'];
$year=$tmp['year'];
$projectstatic=new Project($db);
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); // Return all projects I have permission on because I want my tasks and some of my task may be on a public projet that is not my project
......@@ -226,7 +230,7 @@ if ($db->type != 'pgsql')
$sql.= " AND p.entity = ".$conf->entity;
$sql.= " AND tt.fk_task = t.rowid";
$sql.= " AND tt.fk_user = ".$user->id;
$sql.= " AND task_date >= '".dol_get_first_day($year, $month).'" AND ...";
$sql.= " AND task_date >= '".$db->idate(dol_get_first_day($year, $month)).'" AND ...";
$sql.= " AND p.rowid in (".$projectsListId.")";
$sql.= " GROUP BY p.rowid, p.ref, p.title";
......@@ -283,13 +287,15 @@ $sql.= " WHERE t.fk_projet = p.rowid";
$sql.= " AND p.entity = ".$conf->entity;
$sql.= " AND tt.fk_task = t.rowid";
$sql.= " AND tt.fk_user = ".$user->id;
$sql.= " AND task_date BETWEEN '".dol_get_first_day($year, $month).'" AND "'.dol_get_last_day($year, $month)."'";
$sql.= " AND task_date BETWEEN '".$db->idate(dol_get_first_day($year, $month))."' AND '".$db->idate(dol_get_last_day($year, $month))."'";
$sql.= " AND p.rowid in (".$projectsListId.")";
$sql.= " GROUP BY p.rowid, p.ref, p.title";
$resql = $db->query($sql);
if ( $resql )
{
$total = 0;
$var=false;
while ($row = $db->fetch_object($resql))
......@@ -304,6 +310,7 @@ if ( $resql )
print '<td align="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>';
print "</tr>\n";
$var=!$var;
$total += $row->nb;
}
$db->free($resql);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment