mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Make sure sorting doesnt break opening balance.
This commit is contained in:
@@ -32,6 +32,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\View\View;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -129,6 +130,7 @@ class IndexController extends Controller
|
||||
* @param Request $request
|
||||
* @param string $objectType
|
||||
*
|
||||
* @throws Exception
|
||||
* @return Factory|View
|
||||
*/
|
||||
public function index(Request $request, string $objectType)
|
||||
@@ -138,10 +140,17 @@ class IndexController extends Controller
|
||||
return $this->emptyIndex($objectType);
|
||||
}
|
||||
|
||||
$objectType = $objectType ?? 'asset';
|
||||
$subTitle = (string) trans(sprintf('firefly.%s_accounts', $objectType));
|
||||
$subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $objectType));
|
||||
$types = config(sprintf('firefly.accountTypesByIdentifier.%s', $objectType));
|
||||
// reset account order:
|
||||
|
||||
$objectType = $objectType ?? 'asset';
|
||||
$subTitle = (string) trans(sprintf('firefly.%s_accounts', $objectType));
|
||||
$subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $objectType));
|
||||
$types = config(sprintf('firefly.accountTypesByIdentifier.%s', $objectType));
|
||||
|
||||
if (1 === random_int(0, 20)) {
|
||||
$this->repository->resetAccountOrder($types);
|
||||
}
|
||||
|
||||
$collection = $this->repository->getActiveAccountsByType($types);
|
||||
$total = $collection->count();
|
||||
$page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page');
|
||||
|
@@ -71,7 +71,7 @@ class InstallController extends Controller
|
||||
'firefly-iii:restore-oauth-keys' => [],
|
||||
'generate-keys' => [], // an exception :(
|
||||
|
||||
// there are 14 upgrade commands.
|
||||
// upgrade commands
|
||||
'firefly-iii:transaction-identifiers' => [],
|
||||
'firefly-iii:migrate-to-groups' => [],
|
||||
'firefly-iii:account-currencies' => [],
|
||||
@@ -87,7 +87,7 @@ class InstallController extends Controller
|
||||
'firefly-iii:migrate-recurrence-meta' => [],
|
||||
'firefly-iii:migrate-tag-locations' => [],
|
||||
|
||||
// there are 16 verify commands.
|
||||
// verify commands
|
||||
'firefly-iii:fix-piggies' => [],
|
||||
'firefly-iii:create-link-types' => [],
|
||||
'firefly-iii:create-access-tokens' => [],
|
||||
@@ -100,6 +100,7 @@ class InstallController extends Controller
|
||||
'firefly-iii:delete-empty-journals' => [],
|
||||
'firefly-iii:delete-empty-groups' => [],
|
||||
'firefly-iii:fix-account-types' => [],
|
||||
'firefly-iii:fix-account-order' => [],
|
||||
'firefly-iii:rename-meta-fields' => [],
|
||||
'firefly-iii:fix-ob-currencies' => [],
|
||||
'firefly-iii:fix-long-descriptions' => [],
|
||||
|
Reference in New Issue
Block a user