Fix charts. [skip ci]

This commit is contained in:
James Cole
2016-05-19 08:57:25 +02:00
parent 536a5cd1c8
commit b22dd29835

View File

@@ -112,7 +112,7 @@ class ReportController extends Controller
$date = $currentStart->format('Y-m'); $date = $currentStart->format('Y-m');
$spent = $repository->spentInPeriod($accounts, $currentStart, $currentEnd); $spent = $repository->spentInPeriod($accounts, $currentStart, $currentEnd);
$earned = $repository->earnedInPeriod($accounts, $currentStart, $currentEnd); $earned = $repository->earnedInPeriod($accounts, $currentStart, $currentEnd);
$spentArray[$date] = $spent; $spentArray[$date] = bcmul($spent, '-1');
$earnedArray[$date] = $earned; $earnedArray[$date] = $earned;
$currentStart = Navigation::addPeriod($currentStart, '1M', 0); $currentStart = Navigation::addPeriod($currentStart, '1M', 0);
} }
@@ -163,7 +163,7 @@ class ReportController extends Controller
$date = $currentStart->format('Y-m'); $date = $currentStart->format('Y-m');
$spent = $repository->spentInPeriod($accounts, $currentStart, $currentEnd); $spent = $repository->spentInPeriod($accounts, $currentStart, $currentEnd);
$earned = $repository->earnedInPeriod($accounts, $currentStart, $currentEnd); $earned = $repository->earnedInPeriod($accounts, $currentStart, $currentEnd);
$spentArray[$date] = $spent; $spentArray[$date] = bcmul($spent, '-1');
$earnedArray[$date] = $earned; $earnedArray[$date] = $earned;
$currentStart = Navigation::addPeriod($currentStart, '1M', 0); $currentStart = Navigation::addPeriod($currentStart, '1M', 0);
} }