Fixed a bug where the category list in a monthly report would be empty.

This commit is contained in:
James Cole
2015-08-02 07:04:43 +02:00
parent af7952f204
commit 4f0ed97410
10 changed files with 24 additions and 23 deletions

View File

@@ -152,7 +152,7 @@ class BudgetController extends Controller
foreach ($budgets as $budget) {
$date = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
$budget->spent = $repository->spentInPeriodCorrected($budget, $date, $end);
$budget->spent = $repository->balanceInPeriod($budget, $date, $end);
$budget->currentRep = $repository->getCurrentRepetition($budget, $date);
if ($budget->currentRep) {
$budgeted = bcadd($budgeted, $budget->currentRep->amount);