Skip to content

Commit

Permalink
Fix error in total of tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 20, 2017
1 parent 2f4ff66 commit ac32161
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion htdocs/core/lib/date.lib.php
Expand Up @@ -171,7 +171,7 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt

if ($format == 'all' || $format == 'allwithouthour' || $format == 'allhour' || $format == 'allhourmin')
{
if ($iSecond === 0) return '0'; // This is to avoid having 0 return a 12:00 AM for en_US
if ((int) $iSecond === 0) return '0'; // This is to avoid having 0 return a 12:00 AM for en_US

$sTime='';
$sDay=0;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/projet/tasks/list.php
Expand Up @@ -816,7 +816,7 @@
}
elseif ($totalarray['totalplannedworkloadfield'] == $i) print '<td align="center">'.convertSecondToTime($totalarray['totalplannedworkload'],$plannedworkloadoutputformat).'</td>';
elseif ($totalarray['totaldurationeffectivefield'] == $i) print '<td align="center">'.convertSecondToTime($totalarray['totaldurationeffective'],$timespentoutputformat).'</td>';
elseif ($totalarray['totalprogress_calculated'] == $i) print '<td align="center">'.($totalarray['totaldurationeffective'] > 0 ? round(100 * $totalarray['totaldurationeffective'] / $totalarray['totalplannedworkload'], 2).' %' : '').'</td>';
elseif ($totalarray['totalprogress_calculated'] == $i) print '<td align="center">'.($totalarray['totalplannedworkload'] > 0 ? round(100 * $totalarray['totaldurationeffective'] / $totalarray['totalplannedworkload'], 2).' %' : '').'</td>';
else print '<td></td>';
}
print '</tr>';
Expand Down

0 comments on commit ac32161

Please sign in to comment.