mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-31 19:27:51 -06:00
Original fix in place. #133
This commit is contained in:
parent
8bab9e84e2
commit
8cdcba3231
@ -289,13 +289,13 @@ class BudgetController extends Controller
|
||||
return Response::json($cache->get()); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
// filter empty budgets:
|
||||
// foreach ($allBudgets as $budget) {
|
||||
// $spent = $repository->balanceInPeriodForList($budget, $start, $end, $accounts);
|
||||
// if ($spent != 0) {
|
||||
// $budgets->push($budget);
|
||||
// }
|
||||
// }
|
||||
// filter empty budgets:
|
||||
foreach ($allBudgets as $budget) {
|
||||
$spent = $repository->balanceInPeriodForList($budget, $start, $end, $accounts);
|
||||
if ($spent != 0) {
|
||||
$budgets->push($budget);
|
||||
}
|
||||
}
|
||||
|
||||
$entries = new Collection;
|
||||
|
||||
@ -306,7 +306,7 @@ class BudgetController extends Controller
|
||||
$row = [clone $start];
|
||||
|
||||
// each budget, fill the row:
|
||||
foreach ($allBudgets as $budget) {
|
||||
foreach ($budgets as $budget) {
|
||||
$spent = $repository->balanceInPeriodForList($budget, $start, $month, $accounts);
|
||||
$row[] = $spent * -1;
|
||||
}
|
||||
@ -314,7 +314,7 @@ class BudgetController extends Controller
|
||||
$start->endOfMonth()->addDay();
|
||||
}
|
||||
|
||||
$data = $this->generator->year($allBudgets, $entries);
|
||||
$data = $this->generator->year($budgets, $entries);
|
||||
$cache->store($data);
|
||||
|
||||
return Response::json($data);
|
||||
|
Loading…
Reference in New Issue
Block a user