From 537d1ac3a5a89080d56cc962793fbead3db48272 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 1 Jul 2026 20:47:10 +0200 Subject: [PATCH 1/5] Fix https://github.com/firefly-iii/firefly-iii/issues/12426 --- app/Console/Commands/Correction/CorrectsAmounts.php | 2 +- app/Support/Navigation.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/Correction/CorrectsAmounts.php b/app/Console/Commands/Correction/CorrectsAmounts.php index c67a1cfcea..2e7d952d94 100644 --- a/app/Console/Commands/Correction/CorrectsAmounts.php +++ b/app/Console/Commands/Correction/CorrectsAmounts.php @@ -64,7 +64,7 @@ class CorrectsAmounts extends Command // transfers must not have foreign currency info if both accounts have the same currency. $this->correctTransfers(); // deposits between assets and liabilities must not have foreign currency info if both accounts have the same currency. - $this->correctDeposits(); + // $this->correctDeposits(); // auto budgets must be positive $this->fixAutoBudgets(); // available budgets must be positive diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index f6c391ce35..9cab0b0b13 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -289,7 +289,7 @@ class Navigation 'last30' => $currentEnd->addDays(30)->startOfDay(), 'last90' => $currentEnd->addDays(90)->startOfDay(), 'last365' => $currentEnd->addDays(365)->startOfDay(), - 'MTD' => $currentEnd->startOfMonth()->startOfDay(), + // 'MTD' => $currentEnd->startOfMonth()->startOfDay(), 'QTD' => $currentEnd->firstOfQuarter()->startOfDay(), 'YTD' => $currentEnd->startOfYear()->startOfDay(), default => null From 169e639a08f86832cf5a14c8e4c47e7121a42b56 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 1 Jul 2026 20:49:55 +0200 Subject: [PATCH 2/5] Update changelog --- changelog.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog.md b/changelog.md index cef5912180..0513a80b4c 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## v6.6.6 - 2026-07-01 + + +### Fixed + +- #12426 + ## v6.6.5 - 2026-06-30 From 724014b179a8f91ce58bb31626cb3f3335279646 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 1 Jul 2026 20:54:56 +0200 Subject: [PATCH 3/5] Fix phpstan --- .../Commands/Correction/CorrectsAmounts.php | 198 +++++++++--------- app/Support/Navigation.php | 2 +- 2 files changed, 100 insertions(+), 100 deletions(-) diff --git a/app/Console/Commands/Correction/CorrectsAmounts.php b/app/Console/Commands/Correction/CorrectsAmounts.php index 2e7d952d94..c816153133 100644 --- a/app/Console/Commands/Correction/CorrectsAmounts.php +++ b/app/Console/Commands/Correction/CorrectsAmounts.php @@ -85,105 +85,105 @@ class CorrectsAmounts extends Command return 0; } - private function correctDeposits(): void - { - Log::debug('Will now correct deposits.'); - - /** @var AccountRepositoryInterface $repository */ - $repository = app(AccountRepositoryInterface::class); - $type = TransactionType::query()->where('type', TransactionTypeEnum::DEPOSIT->value)->first(); - $journals = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->whereNotNull('transactions.foreign_amount') - ->where('transaction_journals.transaction_type_id', $type->id) - ->distinct() - ->get(['transaction_journals.*']) - ; - - /** @var TransactionJournal $journal */ - foreach ($journals as $journal) { - $repository->setUser($journal->user); - $primary = Amount::getPrimaryCurrencyByUserGroup($journal->userGroup); - - $valid = $this->validateJournal($journal); - if (false === $valid) { - // Log::debug(sprintf('Journal #%d does not need to be fixed or is invalid (see previous messages)', $journal->id)); - - continue; - } - Log::debug(sprintf('Journal #%d is ready to be corrected (if necessary).', $journal->id)); - $source = $journal->transactions()->where('amount', '<', '0')->first(); - $destination = $journal->transactions()->where('amount', '>', '0')->first(); - $sourceAccount = $source->account; - $destAccount = $destination->account; - $sourceCurrency = $repository->getAccountCurrency($sourceAccount) ?? $primary; - $destCurrency = $repository->getAccountCurrency($destAccount) ?? $primary; - Log::debug(sprintf('Currency of source account #%d "%s" is %s', $sourceAccount->id, $sourceAccount->name, $sourceCurrency->code)); - Log::debug(sprintf('Currency of destination account #%d "%s" is %s', $destAccount->id, $destAccount->name, $destCurrency->code)); - if ($sourceCurrency->id === $destCurrency->id) { - Log::debug('Both accounts have the same currency. Removing foreign currency info.'); - $source->foreign_currency_id = null; - $source->foreign_amount = null; - $source->save(); - $destination->foreign_currency_id = null; - $destination->foreign_amount = null; - // also make sure that both transactions use the same amounts and currencies, since the currency is the same anyway. - $destination->amount = bcmul($source->amount, '-1'); - $destination->save(); - - continue; - } - - // validate source transaction - if ($destCurrency->id !== $source->foreign_currency_id) { - Log::debug(sprintf( - '[a] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', - $journal->id, - $source->id, - $source->foreignCurrency->code, - $destCurrency->code - )); - $source->foreign_currency_id = $destCurrency->id; - $source->save(); - } - if ($sourceCurrency->id !== $source->transaction_currency_id) { - Log::debug(sprintf( - '[b] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', - $journal->id, - $source->id, - $source->transactionCurrency->code, - $sourceCurrency->code - )); - $source->transaction_currency_id = $sourceCurrency->id; - $source->save(); - } - - // validate destination: - if ($sourceCurrency->id !== $destination->foreign_currency_id) { - Log::debug(sprintf( - '[c] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', - $journal->id, - $destination->id, - $destination->foreignCurrency->code, - $sourceCurrency->code - )); - $destination->foreign_currency_id = $sourceCurrency->id; - $destination->save(); - } - - if ($destCurrency->id !== $destination->transaction_currency_id) { - Log::debug(sprintf( - '[d] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', - $journal->id, - $destination->id, - $destination->transactionCurrency->code, - $destCurrency->code - )); - $destination->transaction_currency_id = $destCurrency->id; - $destination->save(); - } - Log::debug(sprintf('Done with journal #%d.', $journal->id)); - } - } +// private function correctDeposits(): void +// { +// Log::debug('Will now correct deposits.'); +// +// /** @var AccountRepositoryInterface $repository */ +// $repository = app(AccountRepositoryInterface::class); +// $type = TransactionType::query()->where('type', TransactionTypeEnum::DEPOSIT->value)->first(); +// $journals = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') +// ->whereNotNull('transactions.foreign_amount') +// ->where('transaction_journals.transaction_type_id', $type->id) +// ->distinct() +// ->get(['transaction_journals.*']) +// ; +// +// /** @var TransactionJournal $journal */ +// foreach ($journals as $journal) { +// $repository->setUser($journal->user); +// $primary = Amount::getPrimaryCurrencyByUserGroup($journal->userGroup); +// +// $valid = $this->validateJournal($journal); +// if (false === $valid) { +// // Log::debug(sprintf('Journal #%d does not need to be fixed or is invalid (see previous messages)', $journal->id)); +// +// continue; +// } +// Log::debug(sprintf('Journal #%d is ready to be corrected (if necessary).', $journal->id)); +// $source = $journal->transactions()->where('amount', '<', '0')->first(); +// $destination = $journal->transactions()->where('amount', '>', '0')->first(); +// $sourceAccount = $source->account; +// $destAccount = $destination->account; +// $sourceCurrency = $repository->getAccountCurrency($sourceAccount) ?? $primary; +// $destCurrency = $repository->getAccountCurrency($destAccount) ?? $primary; +// Log::debug(sprintf('Currency of source account #%d "%s" is %s', $sourceAccount->id, $sourceAccount->name, $sourceCurrency->code)); +// Log::debug(sprintf('Currency of destination account #%d "%s" is %s', $destAccount->id, $destAccount->name, $destCurrency->code)); +// if ($sourceCurrency->id === $destCurrency->id) { +// Log::debug('Both accounts have the same currency. Removing foreign currency info.'); +// $source->foreign_currency_id = null; +// $source->foreign_amount = null; +// $source->save(); +// $destination->foreign_currency_id = null; +// $destination->foreign_amount = null; +// // also make sure that both transactions use the same amounts and currencies, since the currency is the same anyway. +// $destination->amount = bcmul($source->amount, '-1'); +// $destination->save(); +// +// continue; +// } +// +// // validate source transaction +// if ($destCurrency->id !== $source->foreign_currency_id) { +// Log::debug(sprintf( +// '[a] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', +// $journal->id, +// $source->id, +// $source->foreignCurrency->code, +// $destCurrency->code +// )); +// $source->foreign_currency_id = $destCurrency->id; +// $source->save(); +// } +// if ($sourceCurrency->id !== $source->transaction_currency_id) { +// Log::debug(sprintf( +// '[b] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', +// $journal->id, +// $source->id, +// $source->transactionCurrency->code, +// $sourceCurrency->code +// )); +// $source->transaction_currency_id = $sourceCurrency->id; +// $source->save(); +// } +// +// // validate destination: +// if ($sourceCurrency->id !== $destination->foreign_currency_id) { +// Log::debug(sprintf( +// '[c] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', +// $journal->id, +// $destination->id, +// $destination->foreignCurrency->code, +// $sourceCurrency->code +// )); +// $destination->foreign_currency_id = $sourceCurrency->id; +// $destination->save(); +// } +// +// if ($destCurrency->id !== $destination->transaction_currency_id) { +// Log::debug(sprintf( +// '[d] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', +// $journal->id, +// $destination->id, +// $destination->transactionCurrency->code, +// $destCurrency->code +// )); +// $destination->transaction_currency_id = $destCurrency->id; +// $destination->save(); +// } +// Log::debug(sprintf('Done with journal #%d.', $journal->id)); +// } +// } private function correctTransfers(): void { diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 9cab0b0b13..f6c391ce35 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -289,7 +289,7 @@ class Navigation 'last30' => $currentEnd->addDays(30)->startOfDay(), 'last90' => $currentEnd->addDays(90)->startOfDay(), 'last365' => $currentEnd->addDays(365)->startOfDay(), - // 'MTD' => $currentEnd->startOfMonth()->startOfDay(), + 'MTD' => $currentEnd->startOfMonth()->startOfDay(), 'QTD' => $currentEnd->firstOfQuarter()->startOfDay(), 'YTD' => $currentEnd->startOfYear()->startOfDay(), default => null From dc9c435e7f7751fa7ba4df0667948b30c6872b45 Mon Sep 17 00:00:00 2001 From: JC5 Date: Wed, 1 Jul 2026 21:02:21 +0200 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=A4=96=20Auto=20commit=20for=20releas?= =?UTF-8?q?e=20'develop'=20on=202026-07-01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Insight/Income/TagController.php | 5 +- .../Insight/Transfer/TagController.php | 5 +- .../Commands/Correction/CorrectsAmounts.php | 198 +++++++++--------- app/Http/Controllers/Bill/IndexController.php | 5 +- .../Budget/BudgetLimitController.php | 8 +- .../Controllers/Budget/IndexController.php | 5 +- .../Controllers/Chart/BudgetController.php | 8 +- app/Jobs/CreateAutoBudgetLimits.php | 16 +- app/Support/Http/Controllers/AugumentData.php | 9 +- .../Enrichments/RecurringEnrichment.php | 6 +- changelog.md | 2 +- config/firefly.php | 2 +- package-lock.json | 140 ++++++------- 13 files changed, 181 insertions(+), 228 deletions(-) diff --git a/app/Api/V1/Controllers/Insight/Income/TagController.php b/app/Api/V1/Controllers/Insight/Income/TagController.php index 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.php index 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/Console/Commands/Correction/CorrectsAmounts.php b/app/Console/Commands/Correction/CorrectsAmounts.php index c816153133..6ca9daebc7 100644 --- a/app/Console/Commands/Correction/CorrectsAmounts.php +++ b/app/Console/Commands/Correction/CorrectsAmounts.php @@ -85,105 +85,105 @@ class CorrectsAmounts extends Command return 0; } -// private function correctDeposits(): void -// { -// Log::debug('Will now correct deposits.'); -// -// /** @var AccountRepositoryInterface $repository */ -// $repository = app(AccountRepositoryInterface::class); -// $type = TransactionType::query()->where('type', TransactionTypeEnum::DEPOSIT->value)->first(); -// $journals = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') -// ->whereNotNull('transactions.foreign_amount') -// ->where('transaction_journals.transaction_type_id', $type->id) -// ->distinct() -// ->get(['transaction_journals.*']) -// ; -// -// /** @var TransactionJournal $journal */ -// foreach ($journals as $journal) { -// $repository->setUser($journal->user); -// $primary = Amount::getPrimaryCurrencyByUserGroup($journal->userGroup); -// -// $valid = $this->validateJournal($journal); -// if (false === $valid) { -// // Log::debug(sprintf('Journal #%d does not need to be fixed or is invalid (see previous messages)', $journal->id)); -// -// continue; -// } -// Log::debug(sprintf('Journal #%d is ready to be corrected (if necessary).', $journal->id)); -// $source = $journal->transactions()->where('amount', '<', '0')->first(); -// $destination = $journal->transactions()->where('amount', '>', '0')->first(); -// $sourceAccount = $source->account; -// $destAccount = $destination->account; -// $sourceCurrency = $repository->getAccountCurrency($sourceAccount) ?? $primary; -// $destCurrency = $repository->getAccountCurrency($destAccount) ?? $primary; -// Log::debug(sprintf('Currency of source account #%d "%s" is %s', $sourceAccount->id, $sourceAccount->name, $sourceCurrency->code)); -// Log::debug(sprintf('Currency of destination account #%d "%s" is %s', $destAccount->id, $destAccount->name, $destCurrency->code)); -// if ($sourceCurrency->id === $destCurrency->id) { -// Log::debug('Both accounts have the same currency. Removing foreign currency info.'); -// $source->foreign_currency_id = null; -// $source->foreign_amount = null; -// $source->save(); -// $destination->foreign_currency_id = null; -// $destination->foreign_amount = null; -// // also make sure that both transactions use the same amounts and currencies, since the currency is the same anyway. -// $destination->amount = bcmul($source->amount, '-1'); -// $destination->save(); -// -// continue; -// } -// -// // validate source transaction -// if ($destCurrency->id !== $source->foreign_currency_id) { -// Log::debug(sprintf( -// '[a] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', -// $journal->id, -// $source->id, -// $source->foreignCurrency->code, -// $destCurrency->code -// )); -// $source->foreign_currency_id = $destCurrency->id; -// $source->save(); -// } -// if ($sourceCurrency->id !== $source->transaction_currency_id) { -// Log::debug(sprintf( -// '[b] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', -// $journal->id, -// $source->id, -// $source->transactionCurrency->code, -// $sourceCurrency->code -// )); -// $source->transaction_currency_id = $sourceCurrency->id; -// $source->save(); -// } -// -// // validate destination: -// if ($sourceCurrency->id !== $destination->foreign_currency_id) { -// Log::debug(sprintf( -// '[c] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', -// $journal->id, -// $destination->id, -// $destination->foreignCurrency->code, -// $sourceCurrency->code -// )); -// $destination->foreign_currency_id = $sourceCurrency->id; -// $destination->save(); -// } -// -// if ($destCurrency->id !== $destination->transaction_currency_id) { -// Log::debug(sprintf( -// '[d] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', -// $journal->id, -// $destination->id, -// $destination->transactionCurrency->code, -// $destCurrency->code -// )); -// $destination->transaction_currency_id = $destCurrency->id; -// $destination->save(); -// } -// Log::debug(sprintf('Done with journal #%d.', $journal->id)); -// } -// } + // private function correctDeposits(): void + // { + // Log::debug('Will now correct deposits.'); + // + // /** @var AccountRepositoryInterface $repository */ + // $repository = app(AccountRepositoryInterface::class); + // $type = TransactionType::query()->where('type', TransactionTypeEnum::DEPOSIT->value)->first(); + // $journals = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + // ->whereNotNull('transactions.foreign_amount') + // ->where('transaction_journals.transaction_type_id', $type->id) + // ->distinct() + // ->get(['transaction_journals.*']) + // ; + // + // /** @var TransactionJournal $journal */ + // foreach ($journals as $journal) { + // $repository->setUser($journal->user); + // $primary = Amount::getPrimaryCurrencyByUserGroup($journal->userGroup); + // + // $valid = $this->validateJournal($journal); + // if (false === $valid) { + // // Log::debug(sprintf('Journal #%d does not need to be fixed or is invalid (see previous messages)', $journal->id)); + // + // continue; + // } + // Log::debug(sprintf('Journal #%d is ready to be corrected (if necessary).', $journal->id)); + // $source = $journal->transactions()->where('amount', '<', '0')->first(); + // $destination = $journal->transactions()->where('amount', '>', '0')->first(); + // $sourceAccount = $source->account; + // $destAccount = $destination->account; + // $sourceCurrency = $repository->getAccountCurrency($sourceAccount) ?? $primary; + // $destCurrency = $repository->getAccountCurrency($destAccount) ?? $primary; + // Log::debug(sprintf('Currency of source account #%d "%s" is %s', $sourceAccount->id, $sourceAccount->name, $sourceCurrency->code)); + // Log::debug(sprintf('Currency of destination account #%d "%s" is %s', $destAccount->id, $destAccount->name, $destCurrency->code)); + // if ($sourceCurrency->id === $destCurrency->id) { + // Log::debug('Both accounts have the same currency. Removing foreign currency info.'); + // $source->foreign_currency_id = null; + // $source->foreign_amount = null; + // $source->save(); + // $destination->foreign_currency_id = null; + // $destination->foreign_amount = null; + // // also make sure that both transactions use the same amounts and currencies, since the currency is the same anyway. + // $destination->amount = bcmul($source->amount, '-1'); + // $destination->save(); + // + // continue; + // } + // + // // validate source transaction + // if ($destCurrency->id !== $source->foreign_currency_id) { + // Log::debug(sprintf( + // '[a] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', + // $journal->id, + // $source->id, + // $source->foreignCurrency->code, + // $destCurrency->code + // )); + // $source->foreign_currency_id = $destCurrency->id; + // $source->save(); + // } + // if ($sourceCurrency->id !== $source->transaction_currency_id) { + // Log::debug(sprintf( + // '[b] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', + // $journal->id, + // $source->id, + // $source->transactionCurrency->code, + // $sourceCurrency->code + // )); + // $source->transaction_currency_id = $sourceCurrency->id; + // $source->save(); + // } + // + // // validate destination: + // if ($sourceCurrency->id !== $destination->foreign_currency_id) { + // Log::debug(sprintf( + // '[c] Journal #%d: transaction #%d refers to foreign currency "%s" but should refer to "%s".', + // $journal->id, + // $destination->id, + // $destination->foreignCurrency->code, + // $sourceCurrency->code + // )); + // $destination->foreign_currency_id = $sourceCurrency->id; + // $destination->save(); + // } + // + // if ($destCurrency->id !== $destination->transaction_currency_id) { + // Log::debug(sprintf( + // '[d] Journal #%d: transaction #%d refers to currency "%s" but should refer to "%s".', + // $journal->id, + // $destination->id, + // $destination->transactionCurrency->code, + // $destCurrency->code + // )); + // $destination->transaction_currency_id = $destCurrency->id; + // $destination->save(); + // } + // Log::debug(sprintf('Done with journal #%d.', $journal->id)); + // } + // } private function correctTransfers(): void { diff --git a/app/Http/Controllers/Bill/IndexController.php b/app/Http/Controllers/Bill/IndexController.php index 07947c2c85..2009369ae0 100644 --- a/app/Http/Controllers/Bill/IndexController.php +++ b/app/Http/Controllers/Bill/IndexController.php @@ -255,10 +255,7 @@ final class IndexController extends Controller if (count($bill['paid_dates']) < count($bill['pay_dates'])) { $count = count($bill['pay_dates']) - count($bill['paid_dates']); if ($count > 0) { - $avg = bcdiv( - bcadd((string) $bill['amount_min'], (string) $bill['amount_max']), - '2' - ); + $avg = bcdiv(bcadd((string) $bill['amount_min'], (string) $bill['amount_max']), '2'); $avg = bcmul($avg, (string) $count); $sums[$groupOrder][$currencyId]['total_left_to_pay'] = bcadd($sums[$groupOrder][$currencyId]['total_left_to_pay'], $avg); Log::debug( diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.php index b263d702a2..9632996690 100644 --- a/app/Http/Controllers/Budget/BudgetLimitController.php +++ b/app/Http/Controllers/Budget/BudgetLimitController.php @@ -198,13 +198,7 @@ final class BudgetLimitController extends Controller if ($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.php index 750a88e633..674f77fbee 100644 --- a/app/Http/Controllers/Budget/IndexController.php +++ b/app/Http/Controllers/Budget/IndexController.php @@ -284,10 +284,7 @@ final class IndexController extends Controller if (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.php index 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/Jobs/CreateAutoBudgetLimits.php b/app/Jobs/CreateAutoBudgetLimits.php index d61661dd50..93cf5e9364 100644 --- a/app/Jobs/CreateAutoBudgetLimits.php +++ b/app/Jobs/CreateAutoBudgetLimits.php @@ -122,13 +122,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)); @@ -218,13 +212,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/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.php index 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.php index 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/changelog.md b/changelog.md index 0513a80b4c..1f5085e1ef 100644 --- a/changelog.md +++ b/changelog.md @@ -8,7 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed -- #12426 +- [Issue 12426](https://github.com/firefly-iii/firefly-iii/issues/12426) (Important: The latest version removed all references to foreign currency in income) reported by @jgmm81 ## v6.6.5 - 2026-06-30 diff --git a/config/firefly.php b/config/firefly.php index afd9644b67..0a3e78ac10 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -79,7 +79,7 @@ return [ // see cer.php for exchange rates feature flag. ], 'version' => 'develop/2026-07-01', -'build_time' => 1782881975, +'build_time' => 1782932541, '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.json index 69e4be3e74..fea408a191 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1915,9 +1915,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.137.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.137.0.tgz", - "integrity": "sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==", + "version": "0.138.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.138.0.tgz", + "integrity": "sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==", "dev": true, "license": "MIT", "funding": { @@ -2259,9 +2259,9 @@ } }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.3.tgz", - "integrity": "sha512-DT6Z3PhvioeHMvxo+xHc3KtqggrI7CCTXCmC2h/5zUlp5jVitv7XEy+9q5/7v8IolhlioawpMo8Kg0EEBy7J0g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.4.tgz", + "integrity": "sha512-EZLpf/8y7GXkkra90ML47kzik/GMP3EMcE9bPyHmRfxLC6z9+aW5A8poCsoxjrT5GfEcNAAvWwUHjvP1pUQkfw==", "cpu": [ "arm64" ], @@ -2276,9 +2276,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.3.tgz", - "integrity": "sha512-0NwgwsjM7LrsuVnXMK3koTpagBNOhloc/BNjKqZjv4V5zI5r13qx69uVhRx+o5Z0yy4Hzq+lpy7TAgUG/ocvrw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.4.tgz", + "integrity": "sha512-aUi+HBvmYb7j8krl1+qJgkG8C17fO79gk3c+jPw4S8glRFc1DTija9S3EyaTSQUm5GJXYKDAsugBEhFHH2vYiQ==", "cpu": [ "arm64" ], @@ -2293,9 +2293,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.3.tgz", - "integrity": "sha512-YtiBp4disu6V560loT6PjMdiRaWmVvDNrUunAalbiFx2ggeJwxdAsgZMcoGP17uyAsTwAj5V1niksxlHnVQ1Sw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.4.tgz", + "integrity": "sha512-F7hHC3gwY11+vByKPRWqwGbeXWVgKmL+pTGCinaEhdihzBV2aQ0fvZOch9cXYUOKuKKq429HeYXOqQLc7wFCEg==", "cpu": [ "x64" ], @@ -2310,9 +2310,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.3.tgz", - "integrity": "sha512-yD3EkEdXk2LypPxnf/kSZHirarsI8gcPzc62SukhR9VJTyvV+F9Q/GxWNuCojc7sXyuVC4DxRGhdDK4X8VSsbw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.4.tgz", + "integrity": "sha512-sI5yw+7s92SK6odiEhD5lKCBlWcpjHS5qyqpVQbZAJ0fIzEUXrmbl3DH2ybR3PZogulNJF+COLtmA8hUfvkCCQ==", "cpu": [ "x64" ], @@ -2327,9 +2327,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.3.tgz", - "integrity": "sha512-c+8vieQbsD7HNAHKIA34w0GJ9FedFFuJGD+7E6vz7Q3uqAIugL5p45fhlsj4UaAsHpcmlqugBWMhA0/j7o0sIg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.4.tgz", + "integrity": "sha512-mCi0OKgEieFircrtVYmQAFGszRtMnZ6fpZAXrxanXAu7lqZcsK1E1RAaZNG0uKAnxox3B1f4EyQNnoyMfN1vAA==", "cpu": [ "arm" ], @@ -2344,9 +2344,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.3.tgz", - "integrity": "sha512-50jD0uUwLvur7Zz9LHz17kaAdTPjn5wN93hEgjvmYFRZwiR7ZJYovTd5ipyWJDAnXKvZ+wgc+/Ika6dwSF5OcA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.4.tgz", + "integrity": "sha512-B9Ial3Kv5sh0SHnB1g/QWcUQCEvCF6QKGAl4zXypYj65mVI+B4AhFBwPtSN7pDrJeIx8Z7zdy4ntx+wQABom7w==", "cpu": [ "arm64" ], @@ -2361,9 +2361,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.3.tgz", - "integrity": "sha512-BO9+oPL8K9poZJBfYPsXNtYjPE5uM3qeehT3aFcW4LITOl+iSqhp0abzjR2nWBUNjIZeKXjAEWBZ64WjNoHd6w==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.4.tgz", + "integrity": "sha512-lZVym0PuHE1KZ22gmFTC15lAkrg9iTszR617oYRB/iPY1A56ywoJzVKOJBKaot5RiikCObmur6pogpse3gRcng==", "cpu": [ "arm64" ], @@ -2378,9 +2378,9 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.3.tgz", - "integrity": "sha512-f3VpLB1vQ0Eo6ecr/6cekLnvYMFF4YBFoVGkfkvPLq1bAkbAwHYQPZKoAmG6OJyTcxxoC+AvezGx/S1obNC0Mw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.4.tgz", + "integrity": "sha512-t2DNiLJWNTbnEHyUzTumldML6ET4/g16467LZoDDJ3tSxGvguL5/NyC2lCsNKuyRycg9XeDQF5SSv+TNOhQEXg==", "cpu": [ "ppc64" ], @@ -2395,9 +2395,9 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.3.tgz", - "integrity": "sha512-AmurZ26Pqx/RI9N1gzEOCklkKXl927yjfXWUUS0O7Puh8ARM/Ob8qfrD3qnWksScdw6cSrW5PSHE9DyLu7+PtA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.4.tgz", + "integrity": "sha512-0WIRnL1Uw4BvTZRLQt+PVgo6ZKTJadlC2btP+/EOXv2f/DWbY0rEgl+y834mIVwP1FkTlWVTrGGJXf12lru7EQ==", "cpu": [ "s390x" ], @@ -2412,9 +2412,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.3.tgz", - "integrity": "sha512-JJpqs8bRGITDOdbkNKnlojzBabbOHrqjSvDr0IVsZObE1lBcPjxItUEY9eWIDbxaJ3cGrXPWGfGkIxFijg/URg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.4.tgz", + "integrity": "sha512-JWtGshGfX+oENAKonoNkqEJX+7hC8yfhi9GUyPX1VX4mdh1y5r+ZiJLR5XzAB0aoP6s/PcILsGjKq8O0mm24bw==", "cpu": [ "x64" ], @@ -2429,9 +2429,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.3.tgz", - "integrity": "sha512-rSJcdjPxzA/by/6/rYs+v+bXU7UjvnbUWz8MJb6kh6+knqB1dCrtHg0uu7C/4haqJvqdkYHQ5IGn+tCH9GLW/g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.4.tgz", + "integrity": "sha512-rT6yQcxUuXs4CnbofqwHRRV0iem349rLMYpTjkgQGLjrY4ado/eDzwPZPTCgTOlF6Nkp8NEv70yLMTn6qkWxsQ==", "cpu": [ "x64" ], @@ -2446,9 +2446,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.3.tgz", - "integrity": "sha512-hQ3/PYkDJICgevvyNcVrihVeqq7k1Pp3VZ9lY+dauAYUJKO+auqApvANhvR1An9BhmqYKvW2Mu1F9u4DXSMLxQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.4.tgz", + "integrity": "sha512-KXMGoboq5cyaCQjDA4GLuRiOwBQ0EyFnJoVViLeZ45/3rFItRODEr+NdsBcVpll40hhNArlm/speWGRvj08LzA==", "cpu": [ "arm64" ], @@ -2463,9 +2463,9 @@ } }, "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.3.tgz", - "integrity": "sha512-Elcv/BtML9lXrV6JuKITc/grN2kYV9gjsQpW8Jfw4ioK0TOkjBjye0nnyqQNy9STNaI20lXNaQBRrD5gSgR0Yg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.4.tgz", + "integrity": "sha512-5K83rb36oJiY7BCyE9zLZtGcPV4g5wvq+xwdO0XPIwDVZI8cyB/AUjkNXGb92/rnmezEkjMOpgY61rtwjQtFwg==", "cpu": [ "wasm32" ], @@ -2482,9 +2482,9 @@ } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.3.tgz", - "integrity": "sha512-2DrEfhluH9yhiaFApmsjsjwrSYbNcY1oFTzYSP1a535jDbV98zCFanA/96TBUd0iDFcxGmw9QRExwGCXz3U+/g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.4.tgz", + "integrity": "sha512-PnWBtw3TV5KOg69HQQDR0mnQuyCmSGR2pAB4DC1rPF808fgKeTUMj2EOEyKATpgiuxuR5APQmiDO7PDgEjTFSA==", "cpu": [ "arm64" ], @@ -2499,9 +2499,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.3.tgz", - "integrity": "sha512-OL4OMk7UPXOeVGGd3qo5zJyPIljf4AFgk5QAkPPS+OoLuOOozhuaQGC18MxVTnw/06q93gShAJzlwnSCY9YtqA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.4.tgz", + "integrity": "sha512-M1lpniBePobTfsa7Ks9a199e1akxsXn+GYBUKsEzv3YFzOm1HJAMNwKI3qr0Zq+mxwx9gOZoTdP1yXRYsZUocQ==", "cpu": [ "x64" ], @@ -2800,9 +2800,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "26.0.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.1.tgz", - "integrity": "sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==", + "version": "26.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.0.tgz", + "integrity": "sha512-O0A1G3xPGy4w7AgQdAQYUlQ+BKk2Oovw8eRpofyp5KdBZULnbe+WqaOVNrm705SHphCiG4XHsACrSmPu1f+Kgw==", "dev": true, "license": "MIT", "dependencies": { @@ -9889,13 +9889,13 @@ } }, "node_modules/rolldown": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.3.tgz", - "integrity": "sha512-1F1eEtUBtFvcGm1HQ9TiUIUHPQG7mSAODrhIzjxoUEFuo8OcbrGLiVLkevNgj84TE4lnHvnumwFjhJO5Eu135g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.4.tgz", + "integrity": "sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.137.0", + "@oxc-project/types": "=0.138.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -9905,21 +9905,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.1.3", - "@rolldown/binding-darwin-arm64": "1.1.3", - "@rolldown/binding-darwin-x64": "1.1.3", - "@rolldown/binding-freebsd-x64": "1.1.3", - "@rolldown/binding-linux-arm-gnueabihf": "1.1.3", - "@rolldown/binding-linux-arm64-gnu": "1.1.3", - "@rolldown/binding-linux-arm64-musl": "1.1.3", - "@rolldown/binding-linux-ppc64-gnu": "1.1.3", - "@rolldown/binding-linux-s390x-gnu": "1.1.3", - "@rolldown/binding-linux-x64-gnu": "1.1.3", - "@rolldown/binding-linux-x64-musl": "1.1.3", - "@rolldown/binding-openharmony-arm64": "1.1.3", - "@rolldown/binding-wasm32-wasi": "1.1.3", - "@rolldown/binding-win32-arm64-msvc": "1.1.3", - "@rolldown/binding-win32-x64-msvc": "1.1.3" + "@rolldown/binding-android-arm64": "1.1.4", + "@rolldown/binding-darwin-arm64": "1.1.4", + "@rolldown/binding-darwin-x64": "1.1.4", + "@rolldown/binding-freebsd-x64": "1.1.4", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.4", + "@rolldown/binding-linux-arm64-gnu": "1.1.4", + "@rolldown/binding-linux-arm64-musl": "1.1.4", + "@rolldown/binding-linux-ppc64-gnu": "1.1.4", + "@rolldown/binding-linux-s390x-gnu": "1.1.4", + "@rolldown/binding-linux-x64-gnu": "1.1.4", + "@rolldown/binding-linux-x64-musl": "1.1.4", + "@rolldown/binding-openharmony-arm64": "1.1.4", + "@rolldown/binding-wasm32-wasi": "1.1.4", + "@rolldown/binding-win32-arm64-msvc": "1.1.4", + "@rolldown/binding-win32-x64-msvc": "1.1.4" } }, "node_modules/run-parallel": { From 849f75abfbfdae6ff43a315f9faa7a34d8d2f49b Mon Sep 17 00:00:00 2001 From: JC5 Date: Wed, 1 Jul 2026 21:08:40 +0200 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=A4=96=20Auto=20commit=20for=20releas?= =?UTF-8?q?e=20'v6.6.6'=20on=202026-07-01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Insight/Income/TagController.php | 5 ++++- .../Insight/Transfer/TagController.php | 5 ++++- app/Http/Controllers/Bill/IndexController.php | 5 ++++- .../Controllers/Budget/BudgetLimitController.php | 8 +++++++- app/Http/Controllers/Budget/IndexController.php | 5 ++++- app/Http/Controllers/Chart/BudgetController.php | 8 +++++++- app/Jobs/CreateAutoBudgetLimits.php | 16 ++++++++++++++-- app/Support/Http/Controllers/AugumentData.php | 9 ++++++++- .../JsonApi/Enrichments/RecurringEnrichment.php | 6 +++++- config/firefly.php | 4 ++-- 10 files changed, 59 insertions(+), 12 deletions(-) diff --git a/app/Api/V1/Controllers/Insight/Income/TagController.php b/app/Api/V1/Controllers/Insight/Income/TagController.php index df99eef909..94be2ae461 100644 --- a/app/Api/V1/Controllers/Insight/Income/TagController.php +++ b/app/Api/V1/Controllers/Insight/Income/TagController.php @@ -158,7 +158,10 @@ 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.php index f92a7aa9f0..b7b85fd376 100644 --- a/app/Api/V1/Controllers/Insight/Transfer/TagController.php +++ b/app/Api/V1/Controllers/Insight/Transfer/TagController.php @@ -155,7 +155,10 @@ 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/Bill/IndexController.php b/app/Http/Controllers/Bill/IndexController.php index 2009369ae0..07947c2c85 100644 --- a/app/Http/Controllers/Bill/IndexController.php +++ b/app/Http/Controllers/Bill/IndexController.php @@ -255,7 +255,10 @@ final class IndexController extends Controller if (count($bill['paid_dates']) < count($bill['pay_dates'])) { $count = count($bill['pay_dates']) - count($bill['paid_dates']); if ($count > 0) { - $avg = bcdiv(bcadd((string) $bill['amount_min'], (string) $bill['amount_max']), '2'); + $avg = bcdiv( + bcadd((string) $bill['amount_min'], (string) $bill['amount_max']), + '2' + ); $avg = bcmul($avg, (string) $count); $sums[$groupOrder][$currencyId]['total_left_to_pay'] = bcadd($sums[$groupOrder][$currencyId]['total_left_to_pay'], $avg); Log::debug( diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.php index 9632996690..b263d702a2 100644 --- a/app/Http/Controllers/Budget/BudgetLimitController.php +++ b/app/Http/Controllers/Budget/BudgetLimitController.php @@ -198,7 +198,13 @@ final class BudgetLimitController extends Controller if ($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.php index 674f77fbee..750a88e633 100644 --- a/app/Http/Controllers/Budget/IndexController.php +++ b/app/Http/Controllers/Budget/IndexController.php @@ -284,7 +284,10 @@ final class IndexController extends Controller if (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.php index ad724137dc..f4b32fe5c5 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -539,7 +539,13 @@ 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/Jobs/CreateAutoBudgetLimits.php b/app/Jobs/CreateAutoBudgetLimits.php index 93cf5e9364..d61661dd50 100644 --- a/app/Jobs/CreateAutoBudgetLimits.php +++ b/app/Jobs/CreateAutoBudgetLimits.php @@ -122,7 +122,13 @@ 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)); @@ -212,7 +218,13 @@ 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/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.php index a3a940b1ba..a507156873 100644 --- a/app/Support/Http/Controllers/AugumentData.php +++ b/app/Support/Http/Controllers/AugumentData.php @@ -222,7 +222,14 @@ 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.php index d0c09bf027..2428353cb0 100644 --- a/app/Support/JsonApi/Enrichments/RecurringEnrichment.php +++ b/app/Support/JsonApi/Enrichments/RecurringEnrichment.php @@ -354,7 +354,11 @@ 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/config/firefly.php b/config/firefly.php index 0a3e78ac10..4c11df9403 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-07-01', -'build_time' => 1782932541, +'version' => '6.6.6', +'build_time' => 1782932920, 'api_version' => '2.1.0', // field is no longer used. 'db_version' => 28, // field is no longer used.