Moved some stuff around.

This commit is contained in:
James Cole
2015-05-16 09:09:52 +02:00
parent 3270d3bf96
commit 69143399d1
7 changed files with 169 additions and 181 deletions

View File

@@ -137,7 +137,8 @@ class BudgetController extends Controller
$budgets->each(
function (Budget $budget) use ($repository) {
$date = Session::get('start', Carbon::now()->startOfMonth());
$budget->spent = $repository->spentInMonth($budget, $date);
$end = Session::get('end', Carbon::now()->endOfMonth());
$budget->spent = $repository->spentInPeriod($budget, $date, $end);
$budget->currentRep = $repository->getCurrentRepetition($budget, $date);
}
);