Various bugfixes and code clean up.

This commit is contained in:
James Cole
2018-07-27 04:46:21 +02:00
parent 2ad8e7f343
commit 0312ba8ad7
60 changed files with 223 additions and 353 deletions

View File

@@ -77,6 +77,7 @@ class IndexController extends Controller
*/
public function index(Request $request, string $moment = null)
{
/** @var string $range */
$range = app('preferences')->get('viewRange', '1M')->data;
/** @var Carbon $start */
$start = session('start', new Carbon);

View File

@@ -195,6 +195,7 @@ class ShowController extends Controller
->setBudget($budget)->setLimit($pageSize)->setPage($page)->withBudgetInformation();
$transactions = $collector->getPaginatedJournals();
$transactions->setPath(route('budgets.show', [$budget->id, $budgetLimit->id]));
/** @var Carbon $start */
$start = session('first', Carbon::create()->startOfYear());
$end = new Carbon;
$limits = $this->getLimits($budget, $start, $end);