mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Fix recurring transactions create
- If there's a lot of accounts to calculate balances for, then recurring transactions create page doesn't load. Partly because it has to calculate a lot of balances, but partly because the cache isn't being used at all because date is `new Date` rather than say, end of month. Fix: Change Steam balance calculator to always default cache using end of month. Since cache is 'invalidated' upon any edit, there's no reason to use current datetime anywhere its not explicitly required by user flow. Fix: Don't calculate balances for revenue / expense accounts since those are unbounded. Issue: #3597
This commit is contained in:
@@ -260,7 +260,7 @@ class ConvertController extends Controller
|
||||
// group accounts:
|
||||
/** @var Account $account */
|
||||
foreach ($accountList as $account) {
|
||||
$balance = app('steam')->balance($account, new Carbon);
|
||||
$balance = app('steam')->balance($account);
|
||||
$currency = $repository->getAccountCurrency($account) ?? $defaultCurrency;
|
||||
$role = (string) $repository->getMetaValue($account, 'account_role');
|
||||
if ('' === $role) {
|
||||
@@ -289,7 +289,7 @@ class ConvertController extends Controller
|
||||
// group accounts:
|
||||
/** @var Account $account */
|
||||
foreach ($accountList as $account) {
|
||||
$balance = app('steam')->balance($account, new Carbon);
|
||||
$balance = app('steam')->balance($account);
|
||||
$currency = $repository->getAccountCurrency($account) ?? $defaultCurrency;
|
||||
$role = 'l_' . $account->accountType->type;
|
||||
$key = (string) trans('firefly.opt_group_' . $role);
|
||||
|
Reference in New Issue
Block a user