Initial work done to support negative durations, some issues remain.
[timetracker.git] / WEB-INF / lib / ttReportHelper.class.php
index 9c6dfb0..5fd2253 100644 (file)
@@ -513,7 +513,7 @@ class ttReportHelper {
     $res = $mdb2->query($sql);
     if (is_a($res, 'PEAR_Error')) die($res->getMessage());
     while ($val = $res->fetchRow()) {
-      $time = $val['time'] ? sec_to_time_fmt_hm($val['time']) : null;
+      $time = $val['time'] ? ttTimeHelper::minutesToDuration($val['time'] / 60) : null;
       $rowLabel = ttReportHelper::makeGroupByLabel($val['group_field'], $options);
       if ($options['show_cost']) {
         $decimalMark = $user->getDecimalMark();
@@ -595,7 +595,7 @@ class ttReportHelper {
     if (is_a($res, 'PEAR_Error')) die($res->getMessage());
 
     $val = $res->fetchRow();
-    $total_time = $val['time'] ? sec_to_time_fmt_hm($val['time']) : null;
+    $total_time = $val['time'] ? ttTimeHelper::minutesToDuration($val['time'] / 60) : null;
     if ($options['show_cost']) {
       $total_cost = $val['cost'];
       if (!$total_cost) $total_cost = '0.00';