Fix controller for #718

This commit is contained in:
James Cole 2017-07-26 16:40:14 +02:00
parent b3bb8c386f
commit 0f8a66609a
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -306,7 +306,7 @@ class AccountController extends Controller
$collector->setRange($start, $end);
}
$journals = $collector->getPaginatedJournals();
$journals->setPath('accounts/show/' . $account->id . '/' . $moment);
$journals->setPath(route('accounts.show',[$account->id, $moment]));
$count = $journals->getCollection()->count();
if ($count === 0 && $loop < 3) {
$start->subDay();
@ -421,7 +421,7 @@ class AccountController extends Controller
$start = $repository->oldestJournalDate($account);
$range = Preferences::get('viewRange', '1M')->data;
$start = Navigation::startOfPeriod($start, $range);
$end = Navigation::endOfX(new Carbon, $range);
$end = Navigation::endOfX(new Carbon, $range, null);
$entries = new Collection;
// properties for cache