Fixed a negative chart.

This commit is contained in:
James Cole 2015-09-25 16:43:34 +02:00
parent fcc3af6136
commit e12d13c838

View File

@ -68,7 +68,7 @@ class BudgetController extends Controller
$end->subDay(); $end->subDay();
$chartDate = clone $end; $chartDate = clone $end;
$chartDate->startOfMonth(); $chartDate->startOfMonth();
$spent = $repository->balanceInPeriod($budget, $first, $end); $spent = $repository->balanceInPeriod($budget, $first, $end) * -1;
$entries->push([$chartDate, $spent]); $entries->push([$chartDate, $spent]);
$first = Navigation::addPeriod($first, $range, 0); $first = Navigation::addPeriod($first, $range, 0);
} }