From 0885253f86113f95522f9edf2ee318d19dde695c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 22 Mar 2018 11:11:56 +0200 Subject: [PATCH] Fix for task report duration formatting --- app/Jobs/ExportReportResults.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Jobs/ExportReportResults.php b/app/Jobs/ExportReportResults.php index aed6a34e4a21..1608c1094c5b 100644 --- a/app/Jobs/ExportReportResults.php +++ b/app/Jobs/ExportReportResults.php @@ -66,8 +66,12 @@ class ExportReportResults extends Job foreach ($each as $dimension => $val) { $tmp = []; $tmp[] = Utils::getFromCache($currencyId, 'currencies')->name . (($dimension) ? ' - ' . $dimension : ''); - foreach ($val as $id => $field) { - $tmp[] = Utils::formatMoney($field, $currencyId); + foreach ($val as $field => $value) { + if ($field == 'duration') { + $tmp[] = Utils::formatTime($value); + } else { + $tmp[] = Utils::formatMoney($value, $currencyId); + } } $summary[] = $tmp; }