From b22dd29835f3d9b7af85a73b50b0a97adc545bbc Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 19 May 2016 08:57:25 +0200 Subject: [PATCH] Fix charts. [skip ci] --- app/Http/Controllers/Chart/ReportController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 76f0c8475b..d1d62ba9f5 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -112,7 +112,7 @@ class ReportController extends Controller $date = $currentStart->format('Y-m'); $spent = $repository->spentInPeriod($accounts, $currentStart, $currentEnd); $earned = $repository->earnedInPeriod($accounts, $currentStart, $currentEnd); - $spentArray[$date] = $spent; + $spentArray[$date] = bcmul($spent, '-1'); $earnedArray[$date] = $earned; $currentStart = Navigation::addPeriod($currentStart, '1M', 0); } @@ -163,7 +163,7 @@ class ReportController extends Controller $date = $currentStart->format('Y-m'); $spent = $repository->spentInPeriod($accounts, $currentStart, $currentEnd); $earned = $repository->earnedInPeriod($accounts, $currentStart, $currentEnd); - $spentArray[$date] = $spent; + $spentArray[$date] = bcmul($spent, '-1'); $earnedArray[$date] = $earned; $currentStart = Navigation::addPeriod($currentStart, '1M', 0); }