From 5138a09db3ba650d5a01e1457a363eda2470ffc8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 2 Jul 2018 15:54:21 +0200 Subject: [PATCH] Fix sql of time spent per day --- htdocs/projet/activity/perday.php | 4 ++-- htdocs/projet/activity/perweek.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index d46e05eb054..2b8996373e4 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -331,7 +331,7 @@ if ($id) $onlyopenedproject=1; // or -1 $morewherefilter=''; -if ($search_project_ref) $morewherefilter.=natural_search("p.ref", $search_project_ref); +if ($search_project_ref) $morewherefilter.=natural_search(array("p.ref", "p.title"), $search_project_ref); if ($search_task_ref) $morewherefilter.=natural_search("t.ref", $search_task_ref); if ($search_task_label) $morewherefilter.=natural_search(array("t.ref", "t.label"), $search_task_label); if ($search_thirdparty) $morewherefilter.=natural_search("s.nom", $search_thirdparty); @@ -516,7 +516,7 @@ if (! empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)) } $statusofholidaytocheck = '3'; -$isavailablefordayanduser = $holiday->verifDateHolidayForTimestamp($usertoprocess->id, $daytoparse, $statusofholiday); // $daytoparse is a date with hours = 0 +$isavailablefordayanduser = $holiday->verifDateHolidayForTimestamp($usertoprocess->id, $daytoparse, $statusofholidaytocheck); // $daytoparse is a date with hours = 0 $isavailable[$daytoparse]=$isavailablefordayanduser; // in projectLinesPerWeek later, we are using $firstdaytoshow and dol_time_plus_duree to loop on each day $tmparray = dol_getdate($daytoparse,true); // detail of current day diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index e30f3205cc0..cf68f6ccc95 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -334,7 +334,7 @@ if ($id) $onlyopenedproject=1; // or -1 $morewherefilter=''; -if ($search_project_ref) $morewherefilter.=natural_search("p.ref", $search_project_ref); +if ($search_project_ref) $morewherefilter.=natural_search(array("p.ref", "p.title"), $search_project_ref); if ($search_task_ref) $morewherefilter.=natural_search("t.ref", $search_task_ref); if ($search_task_label) $morewherefilter.=natural_search(array("t.ref", "t.label"), $search_task_label); if ($search_thirdparty) $morewherefilter.=natural_search("s.nom", $search_thirdparty);