Skip to content

Commit

Permalink
#41 [TimeSpent] fix: time spent date range
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-theo committed Nov 4, 2022
1 parent b31051a commit 0afee85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/dolisirh_function.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function loadTimeSpentWithinRangeByProject($datestart, $dateend, $project_id, $t
$sql .= " WHERE ptt.fk_task = pt.rowid";
$sql .= " AND pt.fk_projet = ".((int) $project_id);
$sql .= " AND (ptt.task_date >= '".$db->idate($datestart)."' ";
$sql .= " AND ptt.task_date < '".$db->idate($dateend)."')";
$sql .= " AND ptt.task_date < '".$db->idate(dol_time_plus_duree($dateend, 1,'d'))."')";
if ($taskid) {
$sql .= " AND ptt.fk_task=".((int) $taskid);
}
Expand Down Expand Up @@ -447,7 +447,6 @@ function loadPassedTimeWithinRange($datestart, $dateend, $taskid = 0, $userid =
}

$workinghours = new Workinghours($db);
$holiday = new Holiday($db);

$daysInRange = num_between_day($datestart, $dateend, 1);
$workinghoursArray = $workinghours->fetchCurrentWorkingHours($userid, 'user');
Expand Down

0 comments on commit 0afee85

Please sign in to comment.