mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Update for balance box in report.
This commit is contained in:
@@ -47,7 +47,6 @@ class BalanceController extends Controller
|
||||
*/
|
||||
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
||||
// chart properties for cache:
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty($start);
|
||||
@@ -55,17 +54,19 @@ class BalanceController extends Controller
|
||||
$cache->addProperty('balance-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get(); // @codeCoverageIgnore
|
||||
//return $cache->get(); // @codeCoverageIgnore
|
||||
}
|
||||
$helper = app(BalanceReportHelperInterface::class);
|
||||
$balance = $helper->getBalanceReport($accounts, $start, $end);
|
||||
try {
|
||||
$result = view('reports.partials.balance', compact('balance'))->render();
|
||||
$report = $helper->getBalanceReport($accounts, $start, $end);
|
||||
// TODO no budget.
|
||||
// TODO sum over account.
|
||||
// try {
|
||||
$result = view('reports.partials.balance', compact('report'))->render();
|
||||
// @codeCoverageIgnoreStart
|
||||
} catch (Throwable $e) {
|
||||
Log::debug(sprintf('Could not render reports.partials.balance: %s', $e->getMessage()));
|
||||
$result = 'Could not render view.';
|
||||
}
|
||||
// } catch (Throwable $e) {
|
||||
// Log::debug(sprintf('Could not render reports.partials.balance: %s', $e->getMessage()));
|
||||
// $result = 'Could not render view.';
|
||||
// }
|
||||
// @codeCoverageIgnoreEnd
|
||||
$cache->store($result);
|
||||
|
||||
|
Reference in New Issue
Block a user