Merge remote-tracking branch 'origin/3.8' into 3.9
This commit is contained in:
commit
d644a3bc43
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user