Various code cleanup and refactoring. Restored cache.

This commit is contained in:
James Cole
2016-10-09 10:53:37 +02:00
parent a4d2ed74fc
commit 39ea9e85a7
3 changed files with 25 additions and 7 deletions

View File

@@ -226,10 +226,7 @@ class AccountController extends Controller
// grouped other months thing:
// oldest transaction in account:
$start = $repository->firstUseDate($account);
if ($start->year == 1900) {
$start = new Carbon;
}
$start = $repository->firstUseDate($account);
$range = Preferences::get('viewRange', '1M')->data;
$start = Navigation::startOfPeriod($start, $range);
$end = Navigation::endOfX(new Carbon, $range);
@@ -244,8 +241,9 @@ class AccountController extends Controller
if ($cache->has()) {
// $entries = $cache->get();
// return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle'));
$entries = $cache->get();
return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle'));
}
// only include asset accounts when this account is an asset: