Skip to content

Commit

Permalink
#170 [TimeSpent] add: planned_workload on task info
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Feb 9, 2023
1 parent b28084c commit ed25a81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/dolisirh_function.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,8 @@ function doliSirhTaskLinesWithinRange(&$inc, $firstdaytoshow, $lastdaytoshow, $f
if ($taskstatic->planned_workload != '') {
$tmparray = $taskstatic->getSummaryOfTimeSpent();
if ($tmparray['total_duration'] > 0 && !empty($taskstatic->planned_workload)) {
print '<span class="task-progress ' . getTaskProgressColorClass(round($tmparray['total_duration'] / $taskstatic->planned_workload * 100, 2)) . '">' . ' ' . round($tmparray['total_duration'] / $taskstatic->planned_workload * 100, 2) . ' %' . '</span>';
print ' <span class="task-progress ' . getTaskProgressColorClass(round($tmparray['total_duration'] / $taskstatic->planned_workload * 100, 2)) . '">' . ' ' . round($tmparray['total_duration'] / $taskstatic->planned_workload * 100, 2) . ' %' . '</span>';
print ' <span>' . ' ' . convertSecondToTime($taskstatic->planned_workload, 'allhourmin') . '</span>';
} else {
print ' 0 %';
}
Expand Down

0 comments on commit ed25a81

Please sign in to comment.