Fix some routes for the budget report.

This commit is contained in:
James Cole
2016-12-16 08:07:31 +01:00
parent b021c7690f
commit 4de14eba0c
14 changed files with 414 additions and 139 deletions

View File

@@ -65,8 +65,11 @@ class AccountController extends Controller
$cache->addProperty('chart.account.all');
$cache->addProperty($account->id);
if ($cache->has()) {
Log::debug('Return chart.account.all from cache.');
return Response::json($cache->get());
}
Log::debug('Regenerate chart.account.all from scratch.');
/** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepositoryInterface::class);
@@ -458,8 +461,11 @@ class AccountController extends Controller
$cache->addProperty('chart.account.account-balance-chart');
$cache->addProperty($accounts);
if ($cache->has()) {
Log::debug('Return chart.account.account-balance-chart from cache.');
return $cache->get();
}
Log::debug('Regenerate chart.account.account-balance-chart from scratch.');
$chartData = [];
foreach ($accounts as $account) {