Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
🤖 Auto commit for release 'develop' on 2026-09-20
JC52efc30d52a7c
diff --git a/.ci/php-cs-fixer/composer.lock b/.ci/php-cs-fixer/composer.lockindex 85dd6dc5eb..a4e480ab5d 100644--- a/.ci/php-cs-fixer/composer.lock+++ b/.ci/php-cs-fixer/composer.lock@@ -468,16 +468,16 @@},{"name": "friendsofphp/php-cs-fixer",- "version": "v3.95.25",+ "version": "v3.95.26","source": {"type": "git","url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",- "reference": "2cdfc1f3daf173d83a1ebb6177949b58c95de6ff"+ "reference": "11839dfaf25718e1617c522c3dde01ebf96c875f"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/2cdfc1f3daf173d83a1ebb6177949b58c95de6ff",- "reference": "2cdfc1f3daf173d83a1ebb6177949b58c95de6ff",+ "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/11839dfaf25718e1617c522c3dde01ebf96c875f",+ "reference": "11839dfaf25718e1617c522c3dde01ebf96c875f","shasum": ""},"require": {@@ -511,15 +511,15 @@"require-dev": {"facile-it/paraunit": "^1.3.1 || ^2.11.0","infection/infection": "^0.32.7",- "justinrainbow/json-schema": "^6.10.0",+ "justinrainbow/json-schema": "^6.12.0","keradus/cli-executor": "^2.3","php-coveralls/php-coveralls": "^2.9.1","php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.8","php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.8",- "phpunit/phpunit": "^9.6.35 || ^10.5.64 || ^11.5.56 || ^12.5.31 || ^13.0.6",- "symfony/polyfill-php85": "^1.38",- "symfony/var-dumper": "^5.4.48 || ^6.4.36 || ^7.4.8 || ^8.1.1",- "symfony/yaml": "^5.4.53 || ^6.4.41 || ^7.4.13 || ^8.1.1"+ "phpunit/phpunit": "^9.6.36 || ^10.5.64 || ^11.5.56 || ^12.5.35 || ^13.3.3",+ "symfony/polyfill-php85": "^1.41",+ "symfony/var-dumper": "^5.4.48 || ^6.4.45 || ^7.4.18 || ^8.1.7",+ "symfony/yaml": "^5.4.53 || ^6.4.45 || ^7.4.18 || ^8.1.6"},"suggest": {"ext-dom": "For handling output formats in XML",@@ -560,7 +560,7 @@],"support": {"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",- "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.25"+ "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.26"},"funding": [{@@ -568,7 +568,7 @@"type": "github"}],- "time": "2026-09-08T11:11:37+00:00"+ "time": "2026-09-19T19:04:32+00:00"},{"name": "psr/container",diff --git a/app/Api/V1/Controllers/Autocomplete/AccountController.php b/app/Api/V1/Controllers/Autocomplete/AccountController.phpindex 30f4e2b2c2..34a505ce58 100644--- a/app/Api/V1/Controllers/Autocomplete/AccountController.php+++ b/app/Api/V1/Controllers/Autocomplete/AccountController.php@@ -129,13 +129,13 @@ final class AccountController extends Controller}// custom order.-// usort($return, static function (array $left, array $right): int {-// $order = [AccountTypeEnum::ASSET->value, AccountTypeEnum::REVENUE->value, AccountTypeEnum::EXPENSE->value];-// $posA = (int) array_search($left['type'], $order, true);-// $posB = (int) array_search($right['type'], $order, true);-//-// return $posA - $posB;-// });+ // usort($return, static function (array $left, array $right): int {+ // $order = [AccountTypeEnum::ASSET->value, AccountTypeEnum::REVENUE->value, AccountTypeEnum::EXPENSE->value];+ // $posA = (int) array_search($left['type'], $order, true);+ // $posB = (int) array_search($right['type'], $order, true);+ //+ // return $posA - $posB;+ // });return response()->api($return);}diff --git a/app/Api/V1/Controllers/Chart/AccountController.php b/app/Api/V1/Controllers/Chart/AccountController.phpindex fc6e25ade5..98909b93bf 100644--- a/app/Api/V1/Controllers/Chart/AccountController.php+++ b/app/Api/V1/Controllers/Chart/AccountController.php@@ -79,7 +79,6 @@ final class AccountController extends Controller$queryParameters = $request->getParameters();$accounts = $this->getAccountListForGroup($queryParameters);-// move date to end of day$queryParameters['start']->startOfDay();$queryParameters['end']->endOfDay();diff --git a/app/Api/V1/Controllers/Insight/Income/TagController.php b/app/Api/V1/Controllers/Insight/Income/TagController.phpindex 94be2ae461..df99eef909 100644--- a/app/Api/V1/Controllers/Insight/Income/TagController.php+++ b/app/Api/V1/Controllers/Insight/Income/TagController.php@@ -158,10 +158,7 @@ final class TagController extends Controller'currency_id' => (string) $foreignCurrencyId,'currency_code' => $journal['foreign_currency_code'],];- $response[$foreignKey]['difference'] = bcadd(- (string) $response[$foreignKey]['difference'],- Steam::positive($journal['foreign_amount'])- );+ $response[$foreignKey]['difference'] = bcadd((string) $response[$foreignKey]['difference'], Steam::positive($journal['foreign_amount']));$response[$foreignKey]['difference_float'] = (float) $response[$foreignKey]['difference'];}}diff --git a/app/Api/V1/Controllers/Insight/Transfer/TagController.php b/app/Api/V1/Controllers/Insight/Transfer/TagController.phpindex b7b85fd376..f92a7aa9f0 100644--- a/app/Api/V1/Controllers/Insight/Transfer/TagController.php+++ b/app/Api/V1/Controllers/Insight/Transfer/TagController.php@@ -155,10 +155,7 @@ final class TagController extends Controller'currency_id' => (string) $foreignCurrencyId,'currency_code' => $journal['foreign_currency_code'],];- $response[$foreignKey]['difference'] = bcadd(- (string) $response[$foreignKey]['difference'],- Steam::positive($journal['foreign_amount'])- );+ $response[$foreignKey]['difference'] = bcadd((string) $response[$foreignKey]['difference'], Steam::positive($journal['foreign_amount']));$response[$foreignKey]['difference_float'] = (float) $response[$foreignKey]['difference']; // intentional float}}diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.phpindex d461374baa..2edb4f5531 100644--- a/app/Http/Controllers/Budget/BudgetLimitController.php+++ b/app/Http/Controllers/Budget/BudgetLimitController.php@@ -198,13 +198,7 @@ final class BudgetLimitController extends Controllerif ($request->expectsJson()) {$array = $limit->toArray();// add some extra metadata:- $spentArr = $this->opsRepository->sumExpenses(- $limit->start_date,- $limit->end_date,- null,- new Collection()->push($budget),- $currency- );+ $spentArr = $this->opsRepository->sumExpenses($limit->start_date, $limit->end_date, null, new Collection()->push($budget), $currency);$array['spent'] = $spentArr[$currency->id]['sum'] ?? '0';$array['left_formatted'] = Amount::formatAnything($limit->transactionCurrency, bcadd($array['spent'], (string) $array['amount']));$array['amount_formatted'] = Amount::formatAnything($limit->transactionCurrency, $limit['amount']);diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.phpindex 52c6f900e3..65429e59c1 100644--- a/app/Http/Controllers/Budget/IndexController.php+++ b/app/Http/Controllers/Budget/IndexController.php@@ -272,10 +272,7 @@ final class IndexController extends Controllerif (array_key_exists($currency->id, $spentArr) && array_key_exists('sum', $spentArr[$currency->id])) {$array['spent'][$currency->id]['spent'] = $spentArr[$currency->id]['sum'];- $array['spent'][$currency->id]['spent_outside'] = Steam::negative(bcsub(- $spentInLimits[$currency->id],- $spentArr[$currency->id]['sum']- ));+ $array['spent'][$currency->id]['spent_outside'] = Steam::negative(bcsub($spentInLimits[$currency->id], $spentArr[$currency->id]['sum']));$array['spent'][$currency->id]['currency_id'] = $currency->id;$array['spent'][$currency->id]['currency_symbol'] = $currency->symbol;$array['spent'][$currency->id]['currency_decimal_places'] = $currency->decimal_places;diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.phpindex f4b32fe5c5..ad724137dc 100644--- a/app/Http/Controllers/Chart/BudgetController.php+++ b/app/Http/Controllers/Chart/BudgetController.php@@ -539,13 +539,7 @@ final class BudgetController extends Controller}// get spent amount in this period for this currency.- $sum = $this->opsRepository->sumExpenses(- $currentStart,- $currentEnd,- $accounts,- new Collection()->push($budget),- $currency- );+ $sum = $this->opsRepository->sumExpenses($currentStart, $currentEnd, $accounts, new Collection()->push($budget), $currency);$amount = Steam::positive($sum[$currency->id]['sum'] ?? '0');$chartData[0]['entries'][$title] = Steam::bcround($amount, $currency->decimal_places);diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.phpindex 68c293e4ed..6f771cbd73 100644--- a/app/Http/Controllers/HomeController.php+++ b/app/Http/Controllers/HomeController.php@@ -146,7 +146,10 @@ final class HomeController extends Controller$subTitle = (string) trans('firefly.welcome_back');$subTitleIcon = 'bi-piggy-bank';$transactions = [];- $frontpage = Preferences::getFresh('frontpageAccounts', $repository->getAccountsByTypeForGroup([AccountTypeEnum::ASSET->value])->pluck('id')->toArray());+ $frontpage = Preferences::getFresh(+ 'frontpageAccounts',+ $repository->getAccountsByTypeForGroup([AccountTypeEnum::ASSET->value])->pluck('id')->toArray()+ );$frontpageArray = $frontpage->data;if (!is_array($frontpageArray)) {$frontpageArray = [];diff --git a/app/Http/Controllers/Report/TagController.php b/app/Http/Controllers/Report/TagController.phpindex 531368b054..c006e65aba 100644--- a/app/Http/Controllers/Report/TagController.php+++ b/app/Http/Controllers/Report/TagController.php@@ -238,8 +238,8 @@ final class TagController extends Controller*/public function avgExpenses(Collection $accounts, Collection $tags, Carbon $start, Carbon $end){- $spent = $this->opsRepository->listExpenses($start, $end, $accounts, $tags);- $result = [];+ $spent = $this->opsRepository->listExpenses($start, $end, $accounts, $tags);+ $result = [];foreach ($spent as $currency) {foreach ($currency['tags'] as $tag) {foreach ($tag['transaction_journals'] as $journal) {@@ -267,7 +267,7 @@ final class TagController extends Controller$incomeTopLength = count($result);// sort by amount_float// sort temp array by amount.- $amounts = array_column($result, 'avg_float');+ $amounts = array_column($result, 'avg_float');array_multisort($amounts, SORT_ASC, $result);try {@@ -289,12 +289,11 @@ final class TagController extends Controller*/public function avgIncome(Collection $accounts, Collection $tags, Carbon $start, Carbon $end){- $spent = $this->opsRepository->listIncome($start, $end, $accounts, $tags);- $result = [];+ $spent = $this->opsRepository->listIncome($start, $end, $accounts, $tags);+ $result = [];foreach ($spent as $currency) {foreach ($currency['tags'] as $tag) {foreach ($tag['transaction_journals'] as $journal) {-$sourceId = $journal['source_account_id'];$key = sprintf('%d-%d', $sourceId, $currency['currency_id']);$result[$key] ??= [@@ -318,9 +317,10 @@ final class TagController extends Controller}// sort by amount_float// sort temp array by amount.- $amounts = array_column($result, 'avg_float');+ $amounts = array_column($result, 'avg_float');array_multisort($amounts, SORT_DESC, $result);$incomeTopLength = count($result);+try {$result = view('reports.tag.partials.avg-income', ['result' => $result, 'incomeTopLength' => $incomeTopLength])->render();} catch (Throwable $e) {diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.phpindex 0cb55ce453..a0ea327e5f 100644--- a/app/Http/Controllers/Transaction/BulkController.php+++ b/app/Http/Controllers/Transaction/BulkController.php@@ -98,7 +98,7 @@ final class BulkController extends Controller$tagsAction = $request->input('tags_action');$collection = new Collection();$count = 0;- $tags = null === $request->input('tags') ? [] : $request->input('tags');+ $tags = null === $request->input('tags') ? [] : $request->input('tags');foreach ($journalIds as $journalId) {$journalId = (int) $journalId;diff --git a/app/Jobs/CreateAutoBudgetLimits.php b/app/Jobs/CreateAutoBudgetLimits.phpindex affea656a0..476da65ac3 100644--- a/app/Jobs/CreateAutoBudgetLimits.php+++ b/app/Jobs/CreateAutoBudgetLimits.php@@ -132,13 +132,7 @@ class CreateAutoBudgetLimits implements ShouldQueue// if has one, calculate expenses and use that as a base.$repository = app(OperationsRepositoryInterface::class);$repository->setUser($autoBudget->budget->user);- $spent = $repository->sumExpenses(- $previousStart,- $previousEnd,- null,- new Collection()->push($autoBudget->budget),- $autoBudget->transactionCurrency- );+ $spent = $repository->sumExpenses($previousStart, $previousEnd, null, new Collection()->push($autoBudget->budget), $autoBudget->transactionCurrency);$currencyId = $autoBudget->transaction_currency_id;$spentAmount = $spent[$currencyId]['sum'] ?? '0';Log::debug(sprintf('Spent in previous budget period (%s-%s) is %s', $previousStart->format('Y-m-d'), $previousEnd->format('Y-m-d'), $spentAmount));@@ -228,13 +222,7 @@ class CreateAutoBudgetLimits implements ShouldQueue// if has one, calculate expenses and use that as a base.$repository = app(OperationsRepositoryInterface::class);$repository->setUser($autoBudget->budget->user);- $spent = $repository->sumExpenses(- $previousStart,- $previousEnd,- null,- new Collection()->push($autoBudget->budget),- $autoBudget->transactionCurrency- );+ $spent = $repository->sumExpenses($previousStart, $previousEnd, null, new Collection()->push($autoBudget->budget), $autoBudget->transactionCurrency);$currencyId = $autoBudget->transaction_currency_id;$spentAmount = $spent[$currencyId]['sum'] ?? '0';Log::debug(sprintf('Spent in previous budget period (%s-%s) is %s', $previousStart->format('Y-m-d'), $previousEnd->format('Y-m-d'), $spentAmount));diff --git a/app/Models/Account.php b/app/Models/Account.phpindex 5a71b4c004..74badcb837 100644--- a/app/Models/Account.php+++ b/app/Models/Account.php@@ -56,7 +56,7 @@ class Account extends Modeluse ReturnsIntegerUserIdTrait;use SoftDeletes;- protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban', 'native_virtual_balance','order'];+ protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban', 'native_virtual_balance', 'order'];protected $hidden = ['encrypted'];private bool $joinedAccountTypes = false;diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.phpindex 1b71b46f0c..141c887924 100644--- a/app/Repositories/Account/AccountRepository.php+++ b/app/Repositories/Account/AccountRepository.php@@ -48,6 +48,7 @@ use Illuminate\Support\Collection;use Illuminate\Support\Facades\Log;use Illuminate\Support\Facades\Storage;use Override;+use function Safe\json_encode;/**@@ -113,22 +114,18 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac/** @var null|Account */return $this->user->accounts()->find($accountId);}- public function findForGroup(int $accountId): ?Account- {- /** @var null|Account */- return $this->userGroup->accounts()->find($accountId);- }public function findByAccountNumber(string $number, array $types): ?Account{$dbQuery = $this->user->accounts()- ->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')- ->where('accounts.active', true)- ->where(static function (EloquentBuilder $q1) use ($number): void {- $json = json_encode($number);- $q1->where('account_meta.name', '=', 'account_number');- $q1->where('account_meta.data', '=', $json);- });+ ->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')+ ->where('accounts.active', true)+ ->where(static function (EloquentBuilder $q1) use ($number): void {+ $json = json_encode($number);+ $q1->where('account_meta.name', '=', 'account_number');+ $q1->where('account_meta.data', '=', $json);+ })+ ;if (0 !== count($types)) {$dbQuery->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');@@ -155,7 +152,7 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function findByName(string $name, array $types): ?Account{- $query = $this->user->accounts();+ $query = $this->user->accounts();if (0 !== count($types)) {$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');@@ -177,16 +174,22 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacreturn $account;}+ public function findForGroup(int $accountId): ?Account+ {+ /** @var null|Account */+ return $this->userGroup->accounts()->find($accountId);+ }+public function getAccountCurrency(Account $account): ?TransactionCurrency{- $type = $account->accountType->type;- $list = config('firefly.valid_currency_account_types');+ $type = $account->accountType->type;+ $list = config('firefly.valid_currency_account_types');// return null if not in this list.if (!in_array($type, $list, true)) {return null;}- $currencyId = (int)$this->getMetaValue($account, 'currency_id');+ $currencyId = (int) $this->getMetaValue($account, 'currency_id');if ($currencyId > 0) {return Amount::getTransactionCurrencyById($currencyId);}@@ -224,13 +227,13 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function getAccountsByType(array $types, ?array $sort = []): Collection{- $res = array_intersect([- AccountTypeEnum::ASSET->value,- AccountTypeEnum::MORTGAGE->value,- AccountTypeEnum::LOAN->value,- AccountTypeEnum::DEBT->value,- ], $types);- $query = $this->user->accounts();+ $res = array_intersect([+ AccountTypeEnum::ASSET->value,+ AccountTypeEnum::MORTGAGE->value,+ AccountTypeEnum::LOAN->value,+ AccountTypeEnum::DEBT->value,+ ], $types);+ $query = $this->user->accounts();if (0 !== count($types)) {$query->accountTypeIn($types);}@@ -262,13 +265,13 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function getAccountsByTypeForGroup(array $types, ?array $sort = []): Collection{- $res = array_intersect([- AccountTypeEnum::ASSET->value,- AccountTypeEnum::MORTGAGE->value,- AccountTypeEnum::LOAN->value,- AccountTypeEnum::DEBT->value,- ], $types);- $query = $this->userGroup->accounts();+ $res = array_intersect([+ AccountTypeEnum::ASSET->value,+ AccountTypeEnum::MORTGAGE->value,+ AccountTypeEnum::LOAN->value,+ AccountTypeEnum::DEBT->value,+ ], $types);+ $query = $this->userGroup->accounts();if (0 !== count($types)) {$query->accountTypeIn($types);}@@ -309,12 +312,13 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function getActiveAccountsByType(array $types): Collection{$query = $this->user->accounts()- ->with([- 'accountmeta' => static function (HasMany $query): void {- $query->where('name', 'account_role');- },- 'attachments',- ]);+ ->with([+ 'accountmeta' => static function (HasMany $query): void {+ $query->where('name', 'account_role');+ },+ 'attachments',+ ])+ ;if (0 !== count($types)) {$query->accountTypeIn($types);}@@ -328,7 +332,7 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function getAttachments(Account $account): Collection{- $set = $account->attachments()->get();+ $set = $account->attachments()->get();/** @var Storage $disk */$disk = Storage::disk('upload');@@ -348,7 +352,7 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function getCashAccount(): Account{/** @var AccountType $type */- $type = AccountType::query()->where('type', AccountTypeEnum::CASH->value)->first();+ $type = AccountType::query()->where('type', AccountTypeEnum::CASH->value)->first();/** @var AccountFactory $factory */$factory = app(AccountFactory::class);@@ -360,9 +364,10 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function getCreditTransactionGroup(Account $account): ?TransactionGroup{$journal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')- ->where('transactions.account_id', $account->id)- ->transactionTypes([TransactionTypeEnum::LIABILITY_CREDIT->value])- ->first(['transaction_journals.*']);+ ->where('transactions.account_id', $account->id)+ ->transactionTypes([TransactionTypeEnum::LIABILITY_CREDIT->value])+ ->first(['transaction_journals.*'])+ ;return $journal?->transactionGroup;}@@ -370,9 +375,10 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function getInactiveAccountsByType(array $types): Collection{$query = $this->user->accounts()- ->with(['accountmeta' => static function (HasMany $query): void {- $query->where('name', 'account_role');- }]);+ ->with(['accountmeta' => static function (HasMany $query): void {+ $query->where('name', 'account_role');+ }])+ ;if (0 !== count($types)) {$query->accountTypeIn($types);}@@ -395,12 +401,12 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac*/public function getMetaValue(Account $account, string $field): ?string{- $result = $account->accountMeta->filter(static fn(AccountMeta $meta): bool => strtolower($meta->name) === strtolower($field));+ $result = $account->accountMeta->filter(static fn (AccountMeta $meta): bool => strtolower($meta->name) === strtolower($field));if (0 === $result->count()) {return null;}if (1 === $result->count()) {- return (string)$result->first()->data;+ return (string) $result->first()->data;}return null;@@ -417,9 +423,10 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function getOpeningBalance(Account $account): ?TransactionJournal{return TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')- ->where('transactions.account_id', $account->id)- ->transactionTypes([TransactionTypeEnum::OPENING_BALANCE->value])- ->first(['transaction_journals.*']);+ ->where('transactions.account_id', $account->id)+ ->transactionTypes([TransactionTypeEnum::OPENING_BALANCE->value])+ ->first(['transaction_journals.*'])+ ;}/**@@ -427,10 +434,11 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac*/public function getOpeningBalanceAmount(Account $account, bool $convertToPrimary): ?string{- $journal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')- ->where('transactions.account_id', $account->id)- ->transactionTypes([TransactionTypeEnum::OPENING_BALANCE->value, TransactionTypeEnum::LIABILITY_CREDIT->value])- ->first(['transaction_journals.*']);+ $journal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')+ ->where('transactions.account_id', $account->id)+ ->transactionTypes([TransactionTypeEnum::OPENING_BALANCE->value, TransactionTypeEnum::LIABILITY_CREDIT->value])+ ->first(['transaction_journals.*'])+ ;if (null === $journal) {return null;}@@ -451,10 +459,11 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function getOpeningBalanceDate(Account $account): ?string{return TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')- ->where('transactions.account_id', $account->id)- ->transactionTypes([TransactionTypeEnum::OPENING_BALANCE->value, TransactionTypeEnum::LIABILITY_CREDIT->value])- ->first(['transaction_journals.*'])- ?->date->format('Y-m-d H:i:s');+ ->where('transactions.account_id', $account->id)+ ->transactionTypes([TransactionTypeEnum::OPENING_BALANCE->value, TransactionTypeEnum::LIABILITY_CREDIT->value])+ ->first(['transaction_journals.*'])+ ?->date->format('Y-m-d H:i:s')+ ;}public function getOpeningBalanceGroup(Account $account): ?TransactionGroup@@ -481,16 +490,16 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac$name = trans('firefly.reconciliation_account_name', ['name' => $account->name, 'currency' => $currency->code]);/** @var AccountType $type */- $type = AccountType::query()->where('type', AccountTypeEnum::RECONCILIATION->value)->first();+ $type = AccountType::query()->where('type', AccountTypeEnum::RECONCILIATION->value)->first();/** @var null|Account $current */- $current = $this->user->accounts()->where('account_type_id', $type->id)->where('name', $name)->first();+ $current = $this->user->accounts()->where('account_type_id', $type->id)->where('name', $name)->first();if (null !== $current) {return $current;}- $data = [+ $data = ['account_type_id' => null,'account_type_name' => AccountTypeEnum::RECONCILIATION->value,'active' => true,@@ -500,7 +509,7 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac];/** @var AccountFactory $factory */- $factory = app(AccountFactory::class);+ $factory = app(AccountFactory::class);$factory->setUser($account->user);return $factory->create($data);@@ -511,7 +520,7 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac$info = $account->transactions()->distinct()->groupBy('transaction_currency_id')->get(['transaction_currency_id'])->toArray();$currencyIds = [];foreach ($info as $entry) {- $currencyIds[] = (int)$entry['transaction_currency_id'];+ $currencyIds[] = (int) $entry['transaction_currency_id'];}$currencyIds = array_unique($currencyIds);@@ -529,7 +538,7 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function maxOrder(string $type): int{- $sets = [+ $sets = [AccountTypeEnum::ASSET->value => [AccountTypeEnum::DEFAULT->value, AccountTypeEnum::ASSET->value],AccountTypeEnum::EXPENSE->value => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::BENEFICIARY->value],AccountTypeEnum::REVENUE->value => [AccountTypeEnum::REVENUE->value],@@ -553,7 +562,7 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac],];if (array_key_exists(ucfirst($type), $sets)) {- $order = (int)$this->getAccountsByType($sets[ucfirst($type)])->max('order');+ $order = (int) $this->getAccountsByType($sets[ucfirst($type)])->max('order');Log::debug(sprintf('Return max order of "%s" set: %d', $type, $order));return $order;@@ -565,7 +574,7 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacAccountTypeEnum::RECONCILIATION->value,];- $order = (int)$this->getAccountsByType($specials)->max('order');+ $order = (int) $this->getAccountsByType($specials)->max('order');Log::debug(sprintf('Return max order of "%s" set (specials!): %d', $type, $order));return $order;@@ -584,7 +593,8 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac->orderBy('transaction_journals.order', 'DESC')->where('transaction_journals.user_id', $this->user->id)->orderBy('transaction_journals.id', 'ASC') // ASC, because the oldest must come FIRST- ->first(['transaction_journals.id']);+ ->first(['transaction_journals.id'])+ ;if (null !== $first) {/** @var null|TransactionJournal */return TransactionJournal::find($first->id);@@ -617,29 +627,30 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac->where('transaction_journals.date', '>=', $start)->where('transaction_journals.date', '<=', $end)->get([- // currencies- 'transaction_currencies.id as currency_id',- 'transaction_currencies.code as currency_code',- 'transaction_currencies.name as currency_name',- 'transaction_currencies.symbol as currency_symbol',- 'transaction_currencies.decimal_places as currency_decimal_places',-- // foreign- 'foreign_currencies.id as foreign_currency_id',- 'foreign_currencies.code as foreign_currency_code',- 'foreign_currencies.name as foreign_currency_name',- 'foreign_currencies.symbol as foreign_currency_symbol',- 'foreign_currencies.decimal_places as foreign_currency_decimal_places',-- // fields- 'transaction_journals.date',- 'transaction_types.type',- 'transaction_journals.transaction_currency_id',- 'transactions.amount',- 'transactions.native_amount as pc_amount',- 'transactions.foreign_amount',- ])- ->toArray();+ // currencies+ 'transaction_currencies.id as currency_id',+ 'transaction_currencies.code as currency_code',+ 'transaction_currencies.name as currency_name',+ 'transaction_currencies.symbol as currency_symbol',+ 'transaction_currencies.decimal_places as currency_decimal_places',++ // foreign+ 'foreign_currencies.id as foreign_currency_id',+ 'foreign_currencies.code as foreign_currency_code',+ 'foreign_currencies.name as foreign_currency_name',+ 'foreign_currencies.symbol as foreign_currency_symbol',+ 'foreign_currencies.decimal_places as foreign_currency_decimal_places',++ // fields+ 'transaction_journals.date',+ 'transaction_types.type',+ 'transaction_journals.transaction_currency_id',+ 'transactions.amount',+ 'transactions.native_amount as pc_amount',+ 'transactions.foreign_amount',+ ])+ ->toArray()+ ;}public function resetAccountOrder(): void@@ -654,22 +665,23 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac$index = 0;foreach ($list as $account) {if (false === $account->active) {- if (0 !== (int)$account->order) {+ if (0 !== (int) $account->order) {Log::debug(sprintf('Inactive account #%d ("%s"): order should be ZERO be but is %d.', $account->id, $account->name, $account->order));$account->order = 0;$account->save();}+continue;}- if ($index !== (int)$account->order) {+ if ($index !== (int) $account->order) {$account->order = $index;$account->save();}- $index++;+ ++$index;}}// reset the rest to zero.- $all = [+ $all = [AccountTypeEnum::DEFAULT->value,AccountTypeEnum::ASSET->value,AccountTypeEnum::LOAN->value,@@ -678,22 +690,24 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacAccountTypeEnum::MORTGAGE->value,];$this->user->accounts()- ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')- ->where(function (EloquentBuilder $q1) use ($all) {- $q1->where('accounts.order', '!=', 0)- ->whereNotIn('account_types.type', $all);- })->update(['accounts.order' => 0]);+ ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')+ ->where(function (EloquentBuilder $q1) use ($all): void {+ $q1->where('accounts.order', '!=', 0)->whereNotIn('account_types.type', $all);+ })+ ->update(['accounts.order' => 0])+ ;}public function searchAccount(string $query, array $types, int $limit): Collection{$dbQuery = $this->user->accounts()- ->where('active', true)+ ->where('active', true)->orderBy('accounts.account_type_id', 'ASC')- ->orderBy('accounts.order', 'ASC')- ->orderBy('accounts.updated_at', 'DESC')- ->orderBy('accounts.name', 'ASC')- ->with(['accountType']);+ ->orderBy('accounts.order', 'ASC')+ ->orderBy('accounts.updated_at', 'DESC')+ ->orderBy('accounts.name', 'ASC')+ ->with(['accountType'])+ ;if ('' !== $query) {// split query on spaces just in case:$parts = explode(' ', $query);@@ -713,10 +727,11 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function searchAccountIncludingInactive(string $query, array $types, int $limit): Collection{$dbQuery = $this->user->accounts()- ->orderBy('accounts.order', 'ASC')- ->orderBy('accounts.account_type_id', 'ASC')- ->orderBy('accounts.name', 'ASC')- ->with(['accountType']);+ ->orderBy('accounts.order', 'ASC')+ ->orderBy('accounts.account_type_id', 'ASC')+ ->orderBy('accounts.name', 'ASC')+ ->with(['accountType'])+ ;if ('' !== $query) {// split query on spaces just in case:$parts = explode(' ', $query);@@ -736,13 +751,14 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfacpublic function searchAccountNr(string $query, array $types, int $limit): Collection{$dbQuery = $this->user->accounts()- ->distinct()- ->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')- ->where('accounts.active', true)- ->orderBy('accounts.order', 'ASC')- ->orderBy('accounts.account_type_id', 'ASC')- ->orderBy('accounts.name', 'ASC')- ->with(['accountType', 'accountMeta']);+ ->distinct()+ ->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')+ ->where('accounts.active', true)+ ->orderBy('accounts.order', 'ASC')+ ->orderBy('accounts.account_type_id', 'ASC')+ ->orderBy('accounts.name', 'ASC')+ ->with(['accountType', 'accountMeta'])+ ;if ('' !== $query) {// split query on spaces just in case:$parts = explode(' ', $query);diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.phpindex 8169896478..930a590257 100644--- a/app/Repositories/Account/AccountRepositoryInterface.php+++ b/app/Repositories/Account/AccountRepositoryInterface.php@@ -67,7 +67,6 @@ interface AccountRepositoryInterface* @deprecated*/public function find(int $accountId): ?Account;- public function findForGroup(int $accountId): ?Account;public function findByAccountNumber(string $number, array $types): ?Account;@@ -75,19 +74,24 @@ interface AccountRepositoryInterfacepublic function findByName(string $name, array $types): ?Account;+ public function findForGroup(int $accountId): ?Account;+public function getAccountCurrency(Account $account): ?TransactionCurrency;/*** @deprecated*/public function getAccountsById(array $accountIds): Collection;+public function getAccountsByIdForGroup(array $accountIds): Collection;/*** @param array<int, int|string> $types+ ** @deprecated*/public function getAccountsByType(array $types, ?array $sort = []): Collection;+public function getAccountsByTypeForGroup(array $types, ?array $sort = []): Collection;/**diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.phpindex 616fd27a96..e121ffda71 100644--- a/app/Repositories/Journal/JournalRepository.php+++ b/app/Repositories/Journal/JournalRepository.php@@ -40,6 +40,7 @@ use FireflyIII\Support\Repositories\UserGroup\UserGroupInterface;use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;use Illuminate\Support\Collection;use Override;+use function Safe\json_encode;/**@@ -64,9 +65,10 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfacpublic function countByMeta(string $field, string $value, bool $includeDeleted): int{$search = TransactionJournalMeta::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id')- ->where('name', $field)- ->where('data', json_encode($value))- ->where('transaction_journals.user_id', $this->user->id);+ ->where('name', $field)+ ->where('data', json_encode($value))+ ->where('transaction_journals.user_id', $this->user->id)+ ;if ($includeDeleted) {$search->withTrashed();}@@ -78,10 +80,11 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfacpublic function countByNotes(string $value, bool $includeDeleted): int{$search = Note::query()- ->where('noteable_type', TransactionJournal::class)- ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'notes.noteable_id')- ->where('transaction_journals.user_id', $this->user->id)- ->where('text', 'LIKE', sprintf('%%%s%%', $value));+ ->where('noteable_type', TransactionJournal::class)+ ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'notes.noteable_id')+ ->where('transaction_journals.user_id', $this->user->id)+ ->where('text', 'LIKE', sprintf('%%%s%%', $value))+ ;if ($includeDeleted) {$search->withTrashed();}@@ -115,9 +118,10 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfacpublic function findByType(array $types): Collection{return $this->user->transactionJournals()- ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')- ->whereIn('transaction_types.type', $types)- ->get(['transaction_journals.*']);+ ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')+ ->whereIn('transaction_types.type', $types)+ ->get(['transaction_journals.*'])+ ;}/**@@ -148,7 +152,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac}/** @var null|Account $res */- $res = $transaction->account;+ $res = $transaction->account;if (null === $res) {throw new FireflyException('Account is unexpectedly NULL.');}@@ -161,7 +165,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac*/public function getJournalTotal(TransactionJournal $journal): string{- $cache = new CacheProperties();+ $cache = new CacheProperties();$cache->addProperty($journal->id);$cache->addProperty('amount-positive');if ($cache->has()) {@@ -170,7 +174,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac// saves on queries:$amount = $journal->transactions()->where('amount', '>', 0)->get()->sum('amount');- $amount = (string)$amount;+ $amount = (string) $amount;$cache->store($amount);return $amount;@@ -187,7 +191,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac/** @var null|Note $note */$note = $link->notes()->first();- return (string)$note?->text;+ return (string) $note?->text;}/**@@ -222,7 +226,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac}/** @var null|Account $res */- $res = $transaction->account;+ $res = $transaction->account;if (null === $res) {throw new FireflyException('Account is unexpectedly NULL.');}@@ -254,11 +258,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac*/public function searchJournalDescriptions(string $search, int $limit): Collection{- $query = $this->user- ->transactionJournals()- ->orderBy('date', 'DESC')- ->orderBy('id', 'DESC')- ->orderBy('description', 'ASC');+ $query = $this->user->transactionJournals()->orderBy('date', 'DESC')->orderBy('id', 'DESC')->orderBy('description', 'ASC');if ('' !== $search) {$query->whereLike('description', sprintf('%%%s%%', $search));}diff --git a/app/Support/Http/Api/CollectsAccountsFromFilter.php b/app/Support/Http/Api/CollectsAccountsFromFilter.phpindex a52aacb695..150d5a6c1e 100644--- a/app/Support/Http/Api/CollectsAccountsFromFilter.php+++ b/app/Support/Http/Api/CollectsAccountsFromFilter.php@@ -107,7 +107,10 @@ trait CollectsAccountsFromFilter}// if no preselected, but no accounts:if ('empty' === $queryParameters['preselected'] && 0 === $collection->count()) {- $defaultSet = $this->repository->getAccountsByTypeForGroup([AccountTypeEnum::ASSET->value, AccountTypeEnum::DEFAULT->value])->pluck('id')->toArray();+ $defaultSet = $this->repository->getAccountsByTypeForGroup([AccountTypeEnum::ASSET->value, AccountTypeEnum::DEFAULT->value])+ ->pluck('id')+ ->toArray()+ ;$frontpage = Preferences::get('frontpageAccounts', $defaultSet);if (!(is_array($frontpage->data) && count($frontpage->data) > 0)) {@@ -121,12 +124,12 @@ trait CollectsAccountsFromFilter// both options are overruled by "preselected"if ('all' === $queryParameters['preselected']) {return $this->repository->getAccountsByTypeForGroup([- AccountTypeEnum::ASSET->value,- AccountTypeEnum::DEFAULT->value,- AccountTypeEnum::LOAN->value,- AccountTypeEnum::DEBT->value,- AccountTypeEnum::MORTGAGE->value,- ]);+ AccountTypeEnum::ASSET->value,+ AccountTypeEnum::DEFAULT->value,+ AccountTypeEnum::LOAN->value,+ AccountTypeEnum::DEBT->value,+ AccountTypeEnum::MORTGAGE->value,+ ]);}if ('assets' === $queryParameters['preselected'] || 'Asset account' === $queryParameters['preselected']) {return $this->repository->getAccountsByTypeForGroup([AccountTypeEnum::ASSET->value, AccountTypeEnum::DEFAULT->value]);diff --git a/app/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.phpindex a507156873..a3a940b1ba 100644--- a/app/Support/Http/Controllers/AugumentData.php+++ b/app/Support/Http/Controllers/AugumentData.php@@ -222,14 +222,7 @@ trait AugumentData$currentEnd->addMonth();}// primary currency amount.- $expenses = $opsRepository->sumExpenses(- $currentStart,- $currentEnd,- null,- $budgetCollection,- $entry->transactionCurrency,- $this->convertToPrimary- );+ $expenses = $opsRepository->sumExpenses($currentStart, $currentEnd, null, $budgetCollection, $entry->transactionCurrency, $this->convertToPrimary);$spent = $expenses[$currency->id]['sum'] ?? '0';$entry->pc_spent = $spent;diff --git a/app/Support/JsonApi/Enrichments/RecurringEnrichment.php b/app/Support/JsonApi/Enrichments/RecurringEnrichment.phpindex 2428353cb0..d0c09bf027 100644--- a/app/Support/JsonApi/Enrichments/RecurringEnrichment.php+++ b/app/Support/JsonApi/Enrichments/RecurringEnrichment.php@@ -354,11 +354,7 @@ class RecurringEnrichment implements EnrichmentInterface/** @var RecurrenceRepetition $repetition */foreach ($set as $repetition) {- $recurrence = $this->collection->filter(- static fn (Recurrence $item): bool => (int) $item->id === (int) $repetition->recurrence_id- )- ->first()- ;+ $recurrence = $this->collection->filter(static fn (Recurrence $item): bool => (int) $item->id === (int) $repetition->recurrence_id)->first();$fromDate = clone ($recurrence->latest_date ?? $recurrence->first_date);$recurrenceId = (int) $repetition->recurrence_id;$repId = (int) $repetition->id;diff --git a/composer.lock b/composer.lockindex bece63ccc9..dab10615c5 100644--- a/composer.lock+++ b/composer.lock@@ -10867,16 +10867,16 @@},{"name": "larastan/larastan",- "version": "v3.12.1",+ "version": "v3.12.2","source": {"type": "git","url": "https://github.com/larastan/larastan.git",- "reference": "168fd3b955e723c51dbf81709849b0c3ac4ac5f6"+ "reference": "c328727e6103c1147d1c64cc96b3aedfda26bc20"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/larastan/larastan/zipball/168fd3b955e723c51dbf81709849b0c3ac4ac5f6",- "reference": "168fd3b955e723c51dbf81709849b0c3ac4ac5f6",+ "url": "https://api.github.com/repos/larastan/larastan/zipball/c328727e6103c1147d1c64cc96b3aedfda26bc20",+ "reference": "c328727e6103c1147d1c64cc96b3aedfda26bc20","shasum": ""},"require": {@@ -10944,7 +10944,7 @@],"support": {"issues": "https://github.com/larastan/larastan/issues",- "source": "https://github.com/larastan/larastan/tree/v3.12.1"+ "source": "https://github.com/larastan/larastan/tree/v3.12.2"},"funding": [{@@ -10952,7 +10952,7 @@"type": "github"}],- "time": "2026-09-13T15:17:35+00:00"+ "time": "2026-09-19T10:46:58+00:00"},{"name": "laravel-json-api/testing",diff --git a/config/firefly.php b/config/firefly.phpindex 87290f5def..10b03462dd 100644--- a/config/firefly.php+++ b/config/firefly.php@@ -78,8 +78,8 @@ return ['running_balance_column' => (bool)env_default_when_empty(env('USE_RUNNING_BALANCE'), true), // this is only the default value, is not used.// see cer.php for exchange rates feature flag.],-'version' => 'develop/2026-09-18',-'build_time' => 1789755924,+'version' => 'develop/2026-09-20',+'build_time' => 1789885080,'api_version' => '2.1.0', // field is no longer used.'db_version' => 28, // field is no longer used.diff --git a/package-lock.json b/package-lock.jsonindex a2e8137951..108787b3ff 100644--- a/package-lock.json+++ b/package-lock.json@@ -1587,9 +1587,9 @@}},"node_modules/eslint": {- "version": "10.10.0",- "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.10.0.tgz",- "integrity": "sha512-NPXn6r5zl4uET1DAVPaOwzX3rut4c0wcmw3dWJAfOsTM5+TogXo0DDjz8pwm/hL8cyVNpHqeK4JpN0NjnyFFNw==",+ "version": "10.11.0",+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.11.0.tgz",+ "integrity": "sha512-P7a6UEEqb9G95MYAtqkmsTbVXIYyzIfl6NGOIJk162PaahFxFyeGcrlXYFSiagECg4sEm8IseJdZBKR3rx6MsQ==","dev": true,"license": "MIT","workspaces": [diff --git a/resources/assets/v3/js/pages/shared/dates.js b/resources/assets/v3/js/pages/shared/dates.jsindex 012ceb3b91..f80d84d486 100644--- a/resources/assets/v3/js/pages/shared/dates.js+++ b/resources/assets/v3/js/pages/shared/dates.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/-import {addMonths, endOfDay, endOfMonth, startOfMonth, startOfYear, subDays, subMonths} from "date-fns";+import { addMonths, endOfDay, endOfMonth, startOfMonth, startOfYear, subDays, subMonths } from "date-fns";import format from "../../util/format";export default () => ({@@ -153,32 +153,32 @@ export default () => ({let start = startOfMonth(this.range.start);let nextMonth = addMonths(start, 1);let end = endOfMonth(nextMonth);- return {start: nextMonth, end: end};+ return { start: nextMonth, end: end };},getPrevRange() {let start = startOfMonth(this.range.start);let prevMonth = subMonths(start, 1);let end = endOfMonth(prevMonth);- return {start: prevMonth, end: end};+ return { start: prevMonth, end: end };},ytd() {- let end = endOfDay(new Date())+ let end = endOfDay(new Date());let start = startOfYear(this.range.start);- return {start: start, end: end};+ return { start: start, end: end };},mtd() {- let end = endOfDay(new Date())+ let end = endOfDay(new Date());let start = startOfMonth(this.range.start);- return {start: start, end: end};+ return { start: start, end: end };},lastDays(days) {let end = endOfDay(new Date());let start = subDays(end, days);- return {start: start, end: end};+ return { start: start, end: end };},changeDateRange(e) {diff --git a/resources/assets/v3/js/shared/draw-chart.js b/resources/assets/v3/js/shared/draw-chart.jsindex 20cb2060e6..7d625f4bf8 100644--- a/resources/assets/v3/js/shared/draw-chart.js+++ b/resources/assets/v3/js/shared/draw-chart.js@@ -403,7 +403,9 @@ function drawMultiCurrencyLineChart(url, holder, anonymous, drawTodayMarker, col};// safety catch in case there is no data.- if (typeof data === "undefined" || 0 === data.length ||+ if (+ typeof data === "undefined" ||+ 0 === data.length ||(typeof data === "object" && typeof data.labels === "object" && 0 === data.labels.length)) {let el = document.getElementById(holder).parentElement;@@ -532,23 +534,22 @@ function drawSingleCurrencyLineChart(url, holder, anonymous) {});}-function colorizeAllData(data) {- for(let i in data.datasets) {- if(Object.hasOwn(data.datasets, i)) {- if(data.datasets[i].label.startsWith('budgeted')) {+ for (let i in data.datasets) {+ if (Object.hasOwn(data.datasets, i)) {+ if (data.datasets[i].label.startsWith("budgeted")) {// data.datasets[i].backgroundColor = 'rgba(13, 110, 253, 0.8)'; // bg-primary- data.datasets[i].backgroundColor = 'rgba(18, 124, 175, 0.8)'; // bg-sky+ data.datasets[i].backgroundColor = "rgba(18, 124, 175, 0.8)"; // bg-sky}- if(data.datasets[i].label.startsWith('overspent')) {- data.datasets[i].backgroundColor = 'rgba(200, 78, 16, 0.6)'; // bg-orange+ if (data.datasets[i].label.startsWith("overspent")) {+ data.datasets[i].backgroundColor = "rgba(200, 78, 16, 0.6)"; // bg-orange}- if(data.datasets[i].label.startsWith('spent')) {- data.datasets[i].backgroundColor = 'rgba(200, 78, 16, 0.6)'; // bg-orange+ if (data.datasets[i].label.startsWith("spent")) {+ data.datasets[i].backgroundColor = "rgba(200, 78, 16, 0.6)"; // bg-orange}- if(data.datasets[i].label.startsWith('left')) {+ if (data.datasets[i].label.startsWith("left")) {// data.datasets[i].backgroundColor = 'rgba(20, 107, 66, 0.8)'; // bg-success- data.datasets[i].backgroundColor = 'rgba(18, 130, 125, 0.8)'; // bg-teal+ data.datasets[i].backgroundColor = "rgba(18, 130, 125, 0.8)"; // bg-teal}}}diff --git a/resources/assets/v3/js/util/format.js b/resources/assets/v3/js/util/format.jsindex 6b69d0ca0c..a1a50a709d 100644--- a/resources/assets/v3/js/util/format.js+++ b/resources/assets/v3/js/util/format.js@@ -92,7 +92,7 @@ const locales = {// by providing a default string of 'PP' or any of its variants for `formatStr`// it will format dates in whichever way is appropriate to the localeexport default function (date, formatStr = "PP", locale) {- if(typeof locale === "undefined") {+ if (typeof locale === "undefined") {locale = window.__localeId__.replace("_", "");}// console.log("Locale is " + locale);