Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
🤖 Auto commit for release 'develop' on 2026-10-03
JC5c9c8ece46ab7
diff --git a/app/Api/V1/Controllers/Chart/BudgetController.php b/app/Api/V1/Controllers/Chart/BudgetController.phpindex c556e7d34d..59ae7a771a 100644--- a/app/Api/V1/Controllers/Chart/BudgetController.php+++ b/app/Api/V1/Controllers/Chart/BudgetController.php@@ -58,9 +58,9 @@ final class BudgetController extends Controllerprotected array $acceptedRoles = [UserRoleEnum::READ_ONLY];protected OperationsRepositoryInterface $opsRepository;- private BudgetLimitRepositoryInterface $blRepository;- private array $currencies = [];- private BudgetRepositoryInterface $repository;+ private BudgetLimitRepositoryInterface $blRepository;+ private array $currencies = [];+ private BudgetRepositoryInterface $repository;public function __construct(){@@ -87,10 +87,10 @@ final class BudgetController extends Controllerpublic function overview(DateRangeRequest $request): JsonResponse{/** @var Carbon $start */- $start = $request->attributes->get('start');+ $start = $request->attributes->get('start');/** @var Carbon $end */- $end = $request->attributes->get('end');+ $end = $request->attributes->get('end');// code from FrontpageChartGenerator, but not in separate class$budgets = $this->repository->getActiveBudgets();@@ -111,10 +111,10 @@ final class BudgetController extends Controllerpublic function overviewWithBudgetLimits(SameDateRangeRequest $request): JsonResponse{/** @var Carbon $start */- $start = $request->attributes->get('start');+ $start = $request->attributes->get('start');/** @var Carbon $end */- $end = $request->attributes->get('end');+ $end = $request->attributes->get('end');// code from FrontpageChartGenerator, but not in separate class$budgets = $this->repository->getActiveBudgets();@@ -140,7 +140,7 @@ final class BudgetController extends Controllerif ($this->convertToPrimary) {if ($current->transaction_currency_id === $this->primaryCurrency->id) {// simply add it.- $amount = bcadd($amount, (string)$current->amount);+ $amount = bcadd($amount, (string) $current->amount);Log::debug(sprintf('Set amount in limit to %s', $amount));}if ($current->transaction_currency_id !== $this->primaryCurrency->id) {@@ -148,13 +148,13 @@ final class BudgetController extends Controller$converted = $converter->convert($current->transactionCurrency, $this->primaryCurrency, $current->start_date, $current->amount);$amount = bcadd($amount, $converted);Log::debug(sprintf(- 'Budgeted in limit #%d: %s %s, converted to %s %s',- $current->id,- $current->transactionCurrency->code,- $current->amount,- $this->primaryCurrency->code,- $converted- ));+ 'Budgeted in limit #%d: %s %s, converted to %s %s',+ $current->id,+ $current->transactionCurrency->code,+ $current->amount,+ $this->primaryCurrency->code,+ $converted+ ));Log::debug(sprintf('Set amount in limit to %s', $amount));}}@@ -190,7 +190,7 @@ final class BudgetController extends Controller*/foreach ($expenses as $currencyId => $row) {// budgeted, left and overspent are now 0.- $limit = $this->filterLimit($currencyId, $limits);+ $limit = $this->filterLimit($currencyId, $limits);// primary currency entries$row['pc_budgeted'] = '0';@@ -200,7 +200,7 @@ final class BudgetController extends Controllerif ($limit instanceof BudgetLimit) {$row['budgeted'] = $limit->amount;- $row['left'] = bcsub((string)$row['budgeted'], bcmul((string)$row['spent'], '-1'));+ $row['left'] = bcsub((string) $row['budgeted'], bcmul((string) $row['spent'], '-1'));$row['overspent'] = bcmul($row['left'], '-1');$row['left'] = 1 === bccomp($row['left'], '0') ? $row['left'] : '0';$row['overspent'] = 1 === bccomp($row['overspent'], '0') ? $row['overspent'] : '0';@@ -209,10 +209,10 @@ final class BudgetController extends Controller// convert data if necessary.if ($this->convertToPrimary && $currencyId !== $this->primaryCurrency->id) {$currencies[$currencyId] ??= Amount::getTransactionCurrencyById($currencyId);- $row['pc_budgeted'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['budgeted']);- $row['pc_spent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['spent']);- $row['pc_left'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['left']);- $row['pc_overspent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['overspent']);+ $row['pc_budgeted'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['budgeted']);+ $row['pc_spent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['spent']);+ $row['pc_left'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['left']);+ $row['pc_overspent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['overspent']);}if ($this->convertToPrimary && $currencyId === $this->primaryCurrency->id) {$row['pc_budgeted'] = $row['budgeted'];@@ -220,33 +220,33 @@ final class BudgetController extends Controller$row['pc_left'] = $row['left'];$row['pc_overspent'] = $row['overspent'];}- $rows[] = $row;+ $rows[] = $row;}// is always an array- $return = [];+ $return = [];foreach ($rows as $row) {$current = [- 'label' => $budget->name,- 'currency_id' => (string)$row['currency_id'],- 'currency_name' => $row['currency_name'],- 'currency_code' => $row['currency_code'],- 'currency_decimal_places' => $row['currency_decimal_places'],+ 'label' => $budget->name,+ 'currency_id' => (string) $row['currency_id'],+ 'currency_name' => $row['currency_name'],+ 'currency_code' => $row['currency_code'],+ 'currency_decimal_places' => $row['currency_decimal_places'],- 'primary_currency_id' => (string)$this->primaryCurrency->id,+ 'primary_currency_id' => (string) $this->primaryCurrency->id,'primary_currency_name' => $this->primaryCurrency->name,'primary_currency_code' => $this->primaryCurrency->code,'primary_currency_symbol' => $this->primaryCurrency->symbol,'primary_currency_decimal_places' => $this->primaryCurrency->decimal_places,- 'period' => null,- 'date' => $row['start'],- 'start_date' => $row['start'],- 'end_date' => $row['end'],- 'yAxisID' => 0,- 'type' => 'bar',- 'entries' => ['budgeted' => $row['budgeted'], 'spent' => $row['spent'], 'left' => $row['left'], 'overspent' => $row['overspent']],- 'pc_entries' => [+ 'period' => null,+ 'date' => $row['start'],+ 'start_date' => $row['start'],+ 'end_date' => $row['end'],+ 'yAxisID' => 0,+ 'type' => 'bar',+ 'entries' => ['budgeted' => $row['budgeted'], 'spent' => $row['spent'], 'left' => $row['left'], 'overspent' => $row['overspent']],+ 'pc_entries' => ['budgeted' => $row['pc_budgeted'],'spent' => $row['pc_spent'],'left' => $row['pc_left'],@@ -265,9 +265,9 @@ final class BudgetController extends Controllerprivate function processBudgetAndLimits(Budget $budget, Carbon $start, Carbon $end): array{// prep function- $converter = new ExchangeRateConverter();- $currencies = [$this->primaryCurrency->id => $this->primaryCurrency];- $rows = [];+ $converter = new ExchangeRateConverter();+ $currencies = [$this->primaryCurrency->id => $this->primaryCurrency];+ $rows = [];// get all limits:$limits = $this->blRepository->getBudgetLimits($budget, $start, $end);$spentAll = $this->opsRepository->listExpenses($start, $end, null, new Collection()->push($budget));@@ -291,21 +291,21 @@ final class BudgetController extends Controller$row['pc_left'] = '0';$row['pc_overspent'] = '0';- $row['budgeted'] = $limit->amount;- $row['start'] = $limit->start_date;- $row['end'] = $limit->end_date;- $row['left'] = bcsub((string)$row['budgeted'], bcmul((string)$row['spent'], '-1'));- $row['overspent'] = bcmul($row['left'], '-1');- $row['left'] = 1 === bccomp($row['left'], '0') ? $row['left'] : '0';- $row['overspent'] = 1 === bccomp($row['overspent'], '0') ? $row['overspent'] : '0';+ $row['budgeted'] = $limit->amount;+ $row['start'] = $limit->start_date;+ $row['end'] = $limit->end_date;+ $row['left'] = bcsub((string) $row['budgeted'], bcmul((string) $row['spent'], '-1'));+ $row['overspent'] = bcmul($row['left'], '-1');+ $row['left'] = 1 === bccomp($row['left'], '0') ? $row['left'] : '0';+ $row['overspent'] = 1 === bccomp($row['overspent'], '0') ? $row['overspent'] : '0';// convert data if necessary.if ($this->convertToPrimary && $currencyId !== $this->primaryCurrency->id) {$currencies[$currencyId] ??= Amount::getTransactionCurrencyById($currencyId);- $row['pc_budgeted'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['budgeted']);- $row['pc_spent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['spent']);- $row['pc_left'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['left']);- $row['pc_overspent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['overspent']);+ $row['pc_budgeted'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['budgeted']);+ $row['pc_spent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['spent']);+ $row['pc_left'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['left']);+ $row['pc_overspent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['overspent']);}if ($this->convertToPrimary && $currencyId === $this->primaryCurrency->id) {$row['pc_budgeted'] = $row['budgeted'];@@ -313,15 +313,15 @@ final class BudgetController extends Controller$row['pc_left'] = $row['left'];$row['pc_overspent'] = $row['overspent'];}- $rows[] = $row;+ $rows[] = $row;}}// still need to process the "main" spentAll to see if anything is left.// is always an array- $return = [];+ $return = [];foreach ($rows as $row) {- $label = sprintf(+ $label = sprintf('%s (%s - %s)',$budget->name,$row['start']->isoFormat($this->monthAndDayFormat),@@ -332,26 +332,26 @@ final class BudgetController extends Controller}$current = [- 'label' => $label,- 'currency_id' => (string)$row['currency_id'],- 'currency_name' => $row['currency_name'],- 'currency_code' => $row['currency_code'],- 'currency_decimal_places' => $row['currency_decimal_places'],+ 'label' => $label,+ 'currency_id' => (string) $row['currency_id'],+ 'currency_name' => $row['currency_name'],+ 'currency_code' => $row['currency_code'],+ 'currency_decimal_places' => $row['currency_decimal_places'],- 'primary_currency_id' => (string)$this->primaryCurrency->id,+ 'primary_currency_id' => (string) $this->primaryCurrency->id,'primary_currency_name' => $this->primaryCurrency->name,'primary_currency_code' => $this->primaryCurrency->code,'primary_currency_symbol' => $this->primaryCurrency->symbol,'primary_currency_decimal_places' => $this->primaryCurrency->decimal_places,- 'period' => null,- 'date' => $row['start'],- 'start_date' => $row['start'],- 'end_date' => $row['end'],- 'yAxisID' => 0,- 'type' => 'bar',- 'entries' => ['budgeted' => $row['budgeted'], 'spent' => $row['spent'], 'left' => $row['left'], 'overspent' => $row['overspent']],- 'pc_entries' => [+ 'period' => null,+ 'date' => $row['start'],+ 'start_date' => $row['start'],+ 'end_date' => $row['end'],+ 'yAxisID' => 0,+ 'type' => 'bar',+ 'entries' => ['budgeted' => $row['budgeted'], 'spent' => $row['spent'], 'left' => $row['left'], 'overspent' => $row['overspent']],+ 'pc_entries' => ['budgeted' => $row['pc_budgeted'],'spent' => $row['pc_spent'],'left' => $row['pc_left'],@@ -372,10 +372,10 @@ final class BudgetController extends Controller// convert data if necessary.if ($this->convertToPrimary && $currencyId !== $this->primaryCurrency->id) {$currencies[$currencyId] ??= Amount::getTransactionCurrencyById($currencyId);- $row['pc_budgeted'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['budgeted']);- $row['pc_spent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['spent']);- $row['pc_left'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['left']);- $row['pc_overspent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['overspent']);+ $row['pc_budgeted'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['budgeted']);+ $row['pc_spent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['spent']);+ $row['pc_left'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['left']);+ $row['pc_overspent'] = $converter->convert($currencies[$currencyId], $this->primaryCurrency, $start, $row['overspent']);}if ($this->convertToPrimary && $currencyId === $this->primaryCurrency->id) {$row['pc_budgeted'] = $row['budgeted'];@@ -384,34 +384,34 @@ final class BudgetController extends Controller$row['pc_overspent'] = $row['overspent'];}- $current = [- 'label' => sprintf('%s %s', $budget->name, trans('firefly.spent_outside_chart')),- 'currency_id' => (string)$row['currency_id'],- 'currency_name' => $row['currency_name'],- 'currency_code' => $row['currency_code'],- 'currency_decimal_places' => $row['currency_decimal_places'],+ $current = [+ 'label' => sprintf('%s %s', $budget->name, trans('firefly.spent_outside_chart')),+ 'currency_id' => (string) $row['currency_id'],+ 'currency_name' => $row['currency_name'],+ 'currency_code' => $row['currency_code'],+ 'currency_decimal_places' => $row['currency_decimal_places'],- 'primary_currency_id' => (string)$this->primaryCurrency->id,+ 'primary_currency_id' => (string) $this->primaryCurrency->id,'primary_currency_name' => $this->primaryCurrency->name,'primary_currency_code' => $this->primaryCurrency->code,'primary_currency_symbol' => $this->primaryCurrency->symbol,'primary_currency_decimal_places' => $this->primaryCurrency->decimal_places,- 'period' => null,- 'date' => $row['start'],- 'start_date' => $row['start'],- 'end_date' => $row['end'],- 'yAxisID' => 0,- 'type' => 'bar',- 'entries' => ['budgeted' => $row['budgeted'], 'spent' => $row['spent'], 'left' => $row['left'], 'overspent' => $row['overspent']],- 'pc_entries' => [+ 'period' => null,+ 'date' => $row['start'],+ 'start_date' => $row['start'],+ 'end_date' => $row['end'],+ 'yAxisID' => 0,+ 'type' => 'bar',+ 'entries' => ['budgeted' => $row['budgeted'], 'spent' => $row['spent'], 'left' => $row['left'], 'overspent' => $row['overspent']],+ 'pc_entries' => ['budgeted' => $row['pc_budgeted'],'spent' => $row['pc_spent'],'left' => $row['pc_left'],'overspent' => $row['pc_overspent'],],];- $return[] = $current;+ $return[] = $current;}}@@ -438,11 +438,11 @@ final class BudgetController extends Controllerforeach ($spent as $currencyId => $block) {$this->currencies[$currencyId] ??= Amount::getTransactionCurrencyById($currencyId);$return[$currencyId] ??= [- 'currency_id' => (string)$currencyId,+ 'currency_id' => (string) $currencyId,'currency_code' => $block['currency_code'],'currency_name' => $block['currency_name'],'currency_symbol' => $block['currency_symbol'],- 'currency_decimal_places' => (int)$block['currency_decimal_places'],+ 'currency_decimal_places' => (int) $block['currency_decimal_places'],'start' => $start->toAtomString(),'end' => $end->toAtomString(),'budgeted' => '0',@@ -450,13 +450,13 @@ final class BudgetController extends Controller'left' => '0','overspent' => '0',];- $currentBudgetArray = $block['budgets'][$budgetId];+ $currentBudgetArray = $block['budgets'][$budgetId];// var_dump($return);/** @var array $journal */foreach ($currentBudgetArray['transaction_journals'] as $journal) {/** @var numeric-string $amount */- $amount = (string)$journal['amount'];+ $amount = (string) $journal['amount'];$return[$currencyId]['spent'] = bcadd($return[$currencyId]['spent'], $amount);}}diff --git a/app/Api/V1/Controllers/Insight/Income/TagController.php b/app/Api/V1/Controllers/Insight/Income/TagController.phpindex 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.phpindex 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/Console/Commands/Correction/CorrectsUnevenAmount.php b/app/Console/Commands/Correction/CorrectsUnevenAmount.phpindex 600ca07f7f..47d29075c8 100644--- a/app/Console/Commands/Correction/CorrectsUnevenAmount.php+++ b/app/Console/Commands/Correction/CorrectsUnevenAmount.php@@ -59,8 +59,10 @@ class CorrectsUnevenAmount extends Command// convert old-style transactions between assets and liabilities.$this->convertOldStyleTransactions();- if (($this->fixUnevenAmounts() > 0 || $this->matchCurrencies() > 0) &&- true === AppConfiguration::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {+ if (+ ($this->fixUnevenAmounts() > 0 || $this->matchCurrencies() > 0)+ && true === AppConfiguration::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data+ ) {$this->friendlyInfo('Will recalculate transaction running balance columns. This may take a LONG time. Please be patient.');AccountBalanceCalculator::recalculateAll(false);$this->friendlyInfo('Done recalculating transaction running balance columns.');@@ -320,12 +322,13 @@ class CorrectsUnevenAmount extends Command$message = sprintf('Corrected amount in transaction journal #%d', $param);$this->friendlyInfo($message);++$this->count;+return true;}private function fixUnevenAmounts(): int{- $count = 0;+ $count = 0;Log::debug('fixUnevenAmounts()');$journals = DB::table('transactions')->groupBy('transaction_journal_id')@@ -356,11 +359,12 @@ class CorrectsUnevenAmount extends Command}if (0 !== $res) {$fix = $this->fixJournal((int) $entry->transaction_journal_id);- if(true === $fix) {- $count++;+ if (true === $fix) {+ ++$count;}}}+return $count;}@@ -461,6 +465,7 @@ class CorrectsUnevenAmount extends Command}$this->friendlyPositive(sprintf('Fixed %d journal(s) with mismatched currencies.', $journals->count()));+return $count;}}diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.phpindex 2edb4f5531..d461374baa 100644--- a/app/Http/Controllers/Budget/BudgetLimitController.php+++ b/app/Http/Controllers/Budget/BudgetLimitController.php@@ -198,7 +198,13 @@ 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 65429e59c1..52c6f900e3 100644--- a/app/Http/Controllers/Budget/IndexController.php+++ b/app/Http/Controllers/Budget/IndexController.php@@ -272,7 +272,10 @@ 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 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.phpindex 476da65ac3..affea656a0 100644--- a/app/Jobs/CreateAutoBudgetLimits.php+++ b/app/Jobs/CreateAutoBudgetLimits.php@@ -132,7 +132,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));@@ -222,7 +228,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.phpindex 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.phpindex 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/changelog.md b/changelog.mdindex 8169207fab..e679fd57c8 100644--- a/changelog.md+++ b/changelog.md@@ -9,36 +9,36 @@ This project adheres to [Semantic Versioning](http://semver.org/).### Fixed-- #12433-- #12616-- #12756-- #12786-- #12833-- #12868-- #12871-- #12873-- #12891-- #12894-- #12902-- #12907-- #12909-- #12919-- #12921+- [Issue 12433](https://github.com/firefly-iii/firefly-iii/issues/12433) (The running balance is displayed incorrectly when a transfer is made to a wallet-type account and a foreign currency reference is assigned) reported by @jgmm81+- [Discussion 12616](https://github.com/orgs/firefly-iii/discussions/12616) (My transaction date gets converted to ??? time zone) started by @PAS-BC+- [Issue 12756](https://github.com/firefly-iii/firefly-iii/issues/12756) (Transaction creation - Doesn't switch to view mode after submit) reported by @fabienfitoussi+- [Issue 12786](https://github.com/firefly-iii/firefly-iii/issues/12786) (Language / locale display is mixed with each other in some places) reported by @leppa+- [Issue 12833](https://github.com/firefly-iii/firefly-iii/issues/12833) (Rules: strict rule option enabled doesn't work) reported by @rdjong80+- [Issue 12868](https://github.com/firefly-iii/firefly-iii/issues/12868) (Recurrence API: cannot remove all tags) reported by @Toshik1978+- [Issue 12871](https://github.com/firefly-iii/firefly-iii/issues/12871) (Timezone update error) reported by @dragonguy+- [Issue 12873](https://github.com/firefly-iii/firefly-iii/issues/12873) (Now able to update/delete reconciled transaction) reported by @fabienfitoussi+- [Issue 12891](https://github.com/firefly-iii/firefly-iii/issues/12891) ("The Query may not be greater than 50 characters" on Transaction Description) reported by @Kage1+- [Issue 12894](https://github.com/firefly-iii/firefly-iii/issues/12894) (Location Enable/Disable Conflict) reported by @Unsantae+- [Issue 12902](https://github.com/firefly-iii/firefly-iii/issues/12902) (Action-buttons inside recurring transaction doesn't do anything) reported by @Tommy78649+- [Issue 12907](https://github.com/firefly-iii/firefly-iii/issues/12907) (CSS glitch at keywords overview) reported by @vmario89+- [Issue 12909](https://github.com/firefly-iii/firefly-iii/issues/12909) (Withdrawal Split Unable to Select destination Account) reported by @gthbusrr+- [Issue 12919](https://github.com/firefly-iii/firefly-iii/issues/12919) (RangeError: Format string contains an unescaped latin alphabet character 'o' when using pl-PL locale) reported by @lukaszfilo-agh+- [Issue 12921](https://github.com/firefly-iii/firefly-iii/issues/12921) (Firefly III - 500 Internal Server Error when opening importer after last upgrad) reported by @sttehh- [Issue 12922](https://github.com/firefly-iii/firefly-iii/issues/12922) (Undefined variable $incomeTopLength in category graphs) reported by @GunoH-- #12926-- #12927-- #12928+- [Issue 12926](https://github.com/firefly-iii/firefly-iii/issues/12926) (SimpleFIN conversion fails when account IDs contain only digits due to PHP array-key coercion - small change with solution (AI helped)) reported by @Grish-Lon+- [Issue 12927](https://github.com/firefly-iii/firefly-iii/issues/12927) (Use `d` instead of `D` (in `D MMMM y`) for formatting days) reported by @zynexiz+- [Issue 12928](https://github.com/firefly-iii/firefly-iii/issues/12928) (Webhook creation fails) reported by @Xav-v- [Issue 12929](https://github.com/firefly-iii/firefly-iii/issues/12929) (v6.7.6 Alpine.js requires 'unsafe-eval' in CSP – breaks behind strict proxies) reported by @37-b-j-- #12932+- [Issue 12932](https://github.com/firefly-iii/firefly-iii/issues/12932) (Dashboard graph - currency conversion) reported by @marc22polo- [Issue 12934](https://github.com/firefly-iii/firefly-iii/issues/12934) (API: PUT /v1/bills/{id} refuses empty notes, so a bill's notes can't be cleared (the web form allows it)) reported by @mkloouo-- #12937-- #12941-- #12945-- #12947-- #12951-- #12952-- #12953-- #12957+- [Issue 12937](https://github.com/firefly-iii/firefly-iii/issues/12937) (accounts>current balance column not showing original currency only converted currency) reported by @fate8383+- [Issue 12941](https://github.com/firefly-iii/firefly-iii/issues/12941) (Creating or cloning a transaction from an Asset Account no longer returns to the originating account) reported by @Playlist9661+- [Issue 12945](https://github.com/firefly-iii/firefly-iii/issues/12945) (Unable to deselect a Piggy Bank during deposit creation) reported by @ppslim+- [Issue 12947](https://github.com/firefly-iii/firefly-iii/issues/12947) (Raw HTML Responses Shown to User) reported by @alpacasec+- [Issue 12951](https://github.com/firefly-iii/firefly-iii/issues/12951) (Date range selector redirects to home, instead of reloading current page) reported by @davidschlachter+- [Issue 12952](https://github.com/firefly-iii/firefly-iii/issues/12952) (Date range selector can choose an invalid date range) reported by @davidschlachter+- [Issue 12953](https://github.com/firefly-iii/firefly-iii/issues/12953) (Cannot add tags to recurring transaction) reported by @ziegwald+- [Issue 12957](https://github.com/firefly-iii/firefly-iii/issues/12957) (New transaction - withdrawal / expense account) reported by @marc22polo## v6.7.6 - 2026-09-28diff --git a/config/firefly.php b/config/firefly.phpindex cf14fe6501..6e624ee91e 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-10-03',-'build_time' => 1791009508,+'build_time' => 1791013174,'api_version' => '2.1.0', // field is no longer used.'db_version' => 28, // field is no longer used.