Should be enough to fix order issues.

This commit is contained in:
James Cole 2021-03-27 15:28:11 +01:00
parent 436bef01da
commit 922050a79b
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -630,6 +630,10 @@ class AccountRepository implements AccountRepositoryInterface
$list = $this->getAccountsByType($set);
$index = 1;
foreach ($list as $account) {
if(false === $account->active) {
$account->order = 0;
continue;
}
if ($index !== (int)$account->order) {
Log::debug(sprintf('Account #%d ("%s"): order should %d be but is %d.', $account->id, $account->name, $index, $account->order));
$account->order = $index;