Fix date in budget report

This commit is contained in:
James Cole 2015-12-11 17:54:52 +01:00
parent a785c450b1
commit d4690ce580

View File

@ -533,7 +533,7 @@ class ReportHelper implements ReportHelperInterface
$budgetLine = new BudgetLine;
$budgetLine->setBudget($budget);
$budgetLine->setRepetition($repetition);
$expenses = $repository->balanceInPeriodForList($budget, $repetition->startdate, $repetition->enddate, $accounts);
$expenses = $repository->balanceInPeriodForList($budget, $start, $end, $accounts);
$expenses = $expenses * -1;
$left = $expenses < $repetition->amount ? bcsub($repetition->amount, $expenses) : 0;
$spent = $expenses > $repetition->amount ? 0 : $expenses;