Fix auto complete

This commit is contained in:
James Cole
2024-05-12 17:50:54 +02:00
parent 73fdbb6202
commit 45e9d4f8de
8 changed files with 49 additions and 20 deletions

View File

@@ -101,11 +101,16 @@ class AccountController extends Controller
private function parseAccount(Account $account): array
{
$currency = $this->adminRepository->getAccountCurrency($account);
return [
'id' => (string) $account->id,
'title' => $account->name,
'meta' => [
'type' => $account->accountType->type,
'currency_id' => null === $currency ? null : (string) $currency->id,
'currency_code' => $currency?->code,
'currency_symbol' => $currency?->symbol,
'currency_decimal' => $currency?->decimal_places,
'account_balances' => $this->getAccountBalances($account),
],
];