From bed182cf13ece9377b745576c564a0201222f604 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Oct 2019 18:36:03 +0100 Subject: [PATCH] Fix #2783 --- app/Http/Controllers/Chart/ReportController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 57114a12b8..5a3d0cd5e4 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -174,9 +174,9 @@ class ReportController extends Controller $data[$currencyId] = $data[$currencyId] ?? [ 'currency_id' => $currencyId, 'currency_symbol' => $journal['currency_symbol'], - 'currency_code' => $journal['currency_symbol'], + 'currency_code' => $journal['currency_code'], 'currency_name' => $journal['currency_name'], - 'currency_decimal_places' => $journal['currency_decimal_places'], + 'currency_decimal_places' => (int)$journal['currency_decimal_places'], ]; $data[$currencyId][$period] = $data[$currencyId][$period] ?? [ 'period' => $period, @@ -218,7 +218,6 @@ class ReportController extends Controller // loop all possible periods between $start and $end $currentStart = clone $start; while ($currentStart <= $end) { - $currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange); $key = $currentStart->format($format); $title = $currentStart->formatLocalized($titleFormat); $income['entries'][$title] = round($currency[$key]['earned'] ?? '0', $currency['currency_decimal_places']);