Chart was negative. [skip ci]

This commit is contained in:
James Cole 2016-12-29 17:56:12 +01:00
parent dbe9628cc5
commit a54a886bf0

View File

@ -354,7 +354,7 @@ class BudgetController extends Controller
if ($repetitions->count() === 0) {
$spent = $repository->spentInPeriod(new Collection([$budget]), new Collection, $start, $end);
if (bccomp($spent, '0') !== 0) {
$return[$budget->name]['spent'] = $spent;
$return[$budget->name]['spent'] = bcmul($spent, '-1');
$return[$budget->name]['left'] = 0;
$return[$budget->name]['overspent'] = 0;
}