Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
🤖 Auto commit for release 'develop' on 2026-08-28
JC5fc35586a8dc9
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/Tools/Cron.php b/app/Console/Commands/Tools/Cron.phpindex b86354e722..d6f001e7a9 100644--- a/app/Console/Commands/Tools/Cron.php+++ b/app/Console/Commands/Tools/Cron.php@@ -65,19 +65,21 @@ class Cron extends Command/** @var UserRepositoryInterface $repository */$repository = app(UserRepositoryInterface::class);$this->users = $repository->all();- /** @var User|null $admin */++ /** @var null|User $admin */$admin = $repository->getUsersByRole('owner')->first();if (null === $admin) {$this->friendlyError('There is no user in the system with the "owner"-role, cannot continue.');return 1;}- $doAll = !$this->option('download-cer')- && !$this->option('create-recurring')- && !$this->option('create-auto-budgets')- && !$this->option('send-subscription-warnings')- && !$this->option('check-version')- && !$this->option('send-webhook-messages');+ $doAll+ = !$this->option('download-cer')+ && !$this->option('create-recurring')+ && !$this->option('create-auto-budgets')+ && !$this->option('send-subscription-warnings')+ && !$this->option('check-version')+ && !$this->option('send-webhook-messages');$date = null;try {diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.phpindex 6ad725caf4..ff3adcc8eb 100644--- a/app/Http/Controllers/Auth/TwoFactorController.php+++ b/app/Http/Controllers/Auth/TwoFactorController.php@@ -90,7 +90,7 @@ final class TwoFactorController extends ControllerLog::channel('audit')->info(sprintf('User "%s" has had %d failed MFA attempts.', $user->email, $counter));event(new UserKeepsFailingMFA($user, $counter));}- if($counter > 20) {+ if ($counter > 20) {// if the user keeps failing MFA, log them out.Log::channel('audit')->info(sprintf('User "%s" has had %d failed MFA attempts. Logging them out.', $user->email, $counter));Auth::guard()->logout();diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.phpindex de7337738f..04d75cd738 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 215ebbd484..d40d4432a3 100644--- a/app/Http/Controllers/Budget/IndexController.php+++ b/app/Http/Controllers/Budget/IndexController.php@@ -284,7 +284,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 c2629dd836..affea656a0 100644--- a/app/Jobs/CreateAutoBudgetLimits.php+++ b/app/Jobs/CreateAutoBudgetLimits.php@@ -77,7 +77,9 @@ class CreateAutoBudgetLimits implements ShouldQueue{Log::debug(sprintf('Now at start of CreateAutoBudgetLimits() job for %s.', $this->date->format('D d M Y')));- $autoBudgets = AutoBudget::leftJoin('budgets', 'auto_budgets.budget_id', '=', 'budgets.id')->where('budgets.user_id', $this->user->id)->get(['auto_budgets.*',]);+ $autoBudgets = AutoBudget::leftJoin('budgets', 'auto_budgets.budget_id', '=', 'budgets.id')->where('budgets.user_id', $this->user->id)->get([+ 'auto_budgets.*',+ ]);Log::debug(sprintf('Found %d auto budgets.', $autoBudgets->count()));foreach ($autoBudgets as $autoBudget) {$this->handleAutoBudget($autoBudget);@@ -130,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));@@ -220,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/Jobs/DownloadExchangeRates.php b/app/Jobs/DownloadExchangeRates.phpindex 80832fffc0..ee83c5816c 100644--- a/app/Jobs/DownloadExchangeRates.php+++ b/app/Jobs/DownloadExchangeRates.php@@ -29,7 +29,6 @@ use FireflyIII\Exceptions\FireflyException;use FireflyIII\Models\CurrencyExchangeRate;use FireflyIII\Models\TransactionCurrency;use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;-use FireflyIII\Repositories\User\UserRepositoryInterface;use FireflyIII\User;use GuzzleHttp\Client;use GuzzleHttp\Exception\ConnectException;@@ -40,7 +39,6 @@ use Illuminate\Contracts\Queue\ShouldQueue;use Illuminate\Foundation\Bus\Dispatchable;use Illuminate\Queue\InteractsWithQueue;use Illuminate\Queue\SerializesModels;-use Illuminate\Support\Collection;use Illuminate\Support\Facades\Log;use Safe\Exceptions\JsonException;@@ -100,7 +98,7 @@ class DownloadExchangeRates implements ShouldQueuepublic function setUser(User $user): void{- $this->user = $user;+ $this->user = $user;}/**@@ -171,20 +169,20 @@ class DownloadExchangeRates implements ShouldQueueprivate function saveRate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date, float $rate): void{- $this->repository->setUser($this->user);- $this->repository->setUserGroup($this->user->userGroup);- if ($this->repository->isEnabled($from) && $this->repository->isEnabled($to)) {- $existing = $this->repository->getExchangeRate($from, $to, $date);- if (!$existing instanceof CurrencyExchangeRate) {- Log::debug(sprintf('Saved rate from %s to %s for user #%d.', $from->code, $to->code, $this->user->id));-- try {- $this->repository->setExchangeRate($from, $to, $date, $rate);- } catch (FireflyException $e) {- Log::warning(sprintf('Could not set exchange rate, but ignore this: %s', $e->getMessage()));- }+ $this->repository->setUser($this->user);+ $this->repository->setUserGroup($this->user->userGroup);+ if ($this->repository->isEnabled($from) && $this->repository->isEnabled($to)) {+ $existing = $this->repository->getExchangeRate($from, $to, $date);+ if (!$existing instanceof CurrencyExchangeRate) {+ Log::debug(sprintf('Saved rate from %s to %s for user #%d.', $from->code, $to->code, $this->user->id));++ try {+ $this->repository->setExchangeRate($from, $to, $date, $rate);+ } catch (FireflyException $e) {+ Log::warning(sprintf('Could not set exchange rate, but ignore this: %s', $e->getMessage()));}}+ }}private function saveRates(TransactionCurrency $currency, Carbon $date, array $rates): voiddiff --git a/app/Jobs/WarnAboutBills.php b/app/Jobs/WarnAboutBills.phpindex 6ec5d5e946..2711763fa5 100644--- a/app/Jobs/WarnAboutBills.php+++ b/app/Jobs/WarnAboutBills.php@@ -79,26 +79,26 @@ class WarnAboutBills implements ShouldQueue{Log::debug(sprintf('Now at start of WarnAboutBills() job for %s.', $this->date->format('D d M Y')));- $bills = $this->user->bills()->where('active', true)->get();- $overdue = [];-- /** @var Bill $bill */- foreach ($bills as $bill) {- Log::debug(sprintf('Now checking bill #%d ("%s")', $bill->id, $bill->name));- $dates = $this->getDates($bill);- if ($this->needsOverdueAlert($dates)) {- $overdue[] = ['bill' => $bill, 'dates' => $dates];+ $bills = $this->user->bills()->where('active', true)->get();+ $overdue = [];++ /** @var Bill $bill */+ foreach ($bills as $bill) {+ Log::debug(sprintf('Now checking bill #%d ("%s")', $bill->id, $bill->name));+ $dates = $this->getDates($bill);+ if ($this->needsOverdueAlert($dates)) {+ $overdue[] = ['bill' => $bill, 'dates' => $dates];+ }+ if ($this->hasDateFields($bill)) {+ if ($this->needsWarning($bill, 'end_date')) {+ $this->sendWarning($bill, 'end_date');}- if ($this->hasDateFields($bill)) {- if ($this->needsWarning($bill, 'end_date')) {- $this->sendWarning($bill, 'end_date');- }- if ($this->needsWarning($bill, 'extension_date')) {- $this->sendWarning($bill, 'extension_date');- }+ if ($this->needsWarning($bill, 'extension_date')) {+ $this->sendWarning($bill, 'extension_date');}}- $this->sendOverdueAlerts($this->user, $overdue);+ }+ $this->sendOverdueAlerts($this->user, $overdue);Log::debug('Done with handle()');}diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.phpindex 0520405e97..23c12fd997 100644--- a/app/Repositories/User/UserRepository.php+++ b/app/Repositories/User/UserRepository.php@@ -53,7 +53,7 @@ class UserRepository implements UserRepositoryInterfacepublic function allAvailable(): Collection{- return User::query()->orderBy('id', 'DESC')->where('users.blocked',false)->get(['users.*']);+ return User::query()->orderBy('id', 'DESC')->where('users.blocked', false)->get(['users.*']);}public function attachRole(User $user, string $role): booldiff --git a/app/Support/Cronjobs/AbstractCronjob.php b/app/Support/Cronjobs/AbstractCronjob.phpindex 9597749f27..ba55fe5005 100644--- a/app/Support/Cronjobs/AbstractCronjob.php+++ b/app/Support/Cronjobs/AbstractCronjob.php@@ -25,8 +25,6 @@ declare(strict_types=1);namespace FireflyIII\Support\Cronjobs;use Carbon\Carbon;-use FireflyIII\Exceptions\FireflyException;-use FireflyIII\User;use Illuminate\Support\Collection;/**@@ -49,7 +47,7 @@ abstract class AbstractCronjobpublic function __construct(){$this->users = new Collection();- $this->date = today(config('app.timezone'));+ $this->date = today(config('app.timezone'));}abstract public function fire(): void;@@ -65,7 +63,8 @@ abstract class AbstractCronjob$this->force = $force;}- final public function setUsers(Collection $users): void {+ final public function setUsers(Collection $users): void+ {$this->users = $users;}}diff --git a/app/Support/Cronjobs/AutoBudgetCronjob.php b/app/Support/Cronjobs/AutoBudgetCronjob.phpindex dc0c52e5e0..33838b57a2 100644--- a/app/Support/Cronjobs/AutoBudgetCronjob.php+++ b/app/Support/Cronjobs/AutoBudgetCronjob.php@@ -40,13 +40,11 @@ class AutoBudgetCronjob extends AbstractCronjobpublic function fire(): void{/** @var User $user */- foreach($this->users as $user) {--+ foreach ($this->users as $user) {/** @var Configuration $config */- $config = AppConfiguration::get(sprintf('last_ab_job_%d', $user->id), 0);- $lastTime = (int)$config->data;- $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;+ $config = AppConfiguration::get(sprintf('last_ab_job_%d', $user->id), 0);+ $lastTime = (int) $config->data;+ $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;$diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);if (0 === $lastTime) {Log::info(sprintf('Auto budget cron-job has never fired before for user #%d.', $user->id));@@ -56,7 +54,11 @@ class AutoBudgetCronjob extends AbstractCronjobLog::info(sprintf('It has been %s since the auto budget cron-job has fired for user #%d.', $diffForHumans, $user->id));if (false === $this->force || false === $user->hasRole('owner')) {Log::info(sprintf('The auto budget cron-job will not fire now for user #%d.', $user->id));- $this->message = sprintf('It has been %s since the auto budget cron-job has fired. It will not fire now for user #%d.', $diffForHumans, $user->id);+ $this->message = sprintf(+ 'It has been %s since the auto budget cron-job has fired. It will not fire now for user #%d.',+ $diffForHumans,+ $user->id+ );return;}diff --git a/app/Support/Cronjobs/BillWarningCronjob.php b/app/Support/Cronjobs/BillWarningCronjob.phpindex cee322c535..d4bd4a40b6 100644--- a/app/Support/Cronjobs/BillWarningCronjob.php+++ b/app/Support/Cronjobs/BillWarningCronjob.php@@ -44,12 +44,13 @@ class BillWarningCronjob extends AbstractCronjobpublic function fire(): void{Log::debug(sprintf('Now in %s', __METHOD__));+/** @var User $user */- foreach($this->users as $user) {+ foreach ($this->users as $user) {/** @var Configuration $config */- $config = AppConfiguration::get(sprintf('last_bw_job_%d', $user->id), 0);- $lastTime = (int)$config->data;- $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;+ $config = AppConfiguration::get(sprintf('last_bw_job_%d', $user->id), 0);+ $lastTime = (int) $config->data;+ $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;$diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);if (0 === $lastTime) {@@ -60,9 +61,9 @@ class BillWarningCronjob extends AbstractCronjobLog::info(sprintf('It has been %s since the bill notification cron-job has fired for user #%d.', $diffForHumans, $user->id));if (false === $this->force || false === $user->hasRole('owner')) {Log::info(sprintf('The cron-job will not fire now for user #%d.', $user->id));- $this->message = sprintf('It has been %s since the bill notification cron-job has fired. It will not fire now.', $diffForHumans);- $this->jobFired = false;- $this->jobErrored = false;+ $this->message = sprintf('It has been %s since the bill notification cron-job has fired. It will not fire now.', $diffForHumans);+ $this->jobFired = false;+ $this->jobErrored = false;$this->jobSucceeded = false;return;@@ -98,7 +99,12 @@ class BillWarningCronjob extends AbstractCronjob$this->message = 'Bill notification cron job fired successfully.';AppConfiguration::set(sprintf('last_bw_job_%d', $user->id), (int) $this->date->format('U'));- Log::info(sprintf('Marked the last time this job has run as "%s" (%d) for user #%d', $this->date->format('Y-m-d H:i:s'), (int) $this->date->format('U'), $user->id));+ Log::info(sprintf(+ 'Marked the last time this job has run as "%s" (%d) for user #%d',+ $this->date->format('Y-m-d H:i:s'),+ (int) $this->date->format('U'),+ $user->id+ ));Log::info('Done with bill notification cron job task.');}}diff --git a/app/Support/Cronjobs/ExchangeRatesCronjob.php b/app/Support/Cronjobs/ExchangeRatesCronjob.phpindex bf8599921e..2bb19e8c60 100644--- a/app/Support/Cronjobs/ExchangeRatesCronjob.php+++ b/app/Support/Cronjobs/ExchangeRatesCronjob.php@@ -40,8 +40,9 @@ class ExchangeRatesCronjob extends AbstractCronjobpublic function fire(): void{/** @var User $user */- foreach($this->users as $user) {- $key = sprintf('last_cer_job_%d', $user->id);+ foreach ($this->users as $user) {+ $key = sprintf('last_cer_job_%d', $user->id);+/** @var Configuration $config */$config = AppConfiguration::get($key, 0);$lastTime = (int) $config->data;@@ -55,7 +56,12 @@ class ExchangeRatesCronjob extends AbstractCronjobLog::info(sprintf('It has been %s since the exchange rates cron-job has fired for user #%d.', $diffForHumans, $user->id));if (false === $this->force || false === $user->hasRole('owner')) {Log::info(sprintf('The exchange rates cron-job will not fire now for user #%d.', $user->id));- $this->message = sprintf('It has been %s since the exchange rates cron-job has fired for user #%d. It will not fire now.', $diffForHumans, $user->id);+ $this->message = sprintf(+ 'It has been %s since the exchange rates cron-job has fired for user #%d. It will not fire now.',+ $diffForHumans,+ $user->id+ );+continue;}@@ -88,7 +94,12 @@ class ExchangeRatesCronjob extends AbstractCronjob$this->message = 'Exchange rates cron job fired successfully.';AppConfiguration::set(sprintf('last_cer_job_%d', $user->id), (int) $this->date->format('U'));- Log::info(sprintf('Marked the last time this job has run as "%s" (%d) for user #%d', $this->date->format('Y-m-d H:i:s'), (int) $this->date->format('U'), $user->id));+ Log::info(sprintf(+ 'Marked the last time this job has run as "%s" (%d) for user #%d',+ $this->date->format('Y-m-d H:i:s'),+ (int) $this->date->format('U'),+ $user->id+ ));Log::info('Done with exchange rates job task.');}}diff --git a/app/Support/Cronjobs/RecurringCronjob.php b/app/Support/Cronjobs/RecurringCronjob.phpindex 39feb1c60c..d04b65c6a6 100644--- a/app/Support/Cronjobs/RecurringCronjob.php+++ b/app/Support/Cronjobs/RecurringCronjob.php@@ -46,11 +46,11 @@ class RecurringCronjob extends AbstractCronjobLog::debug(sprintf('Now in %s', __METHOD__));/** @var User $user */- foreach($this->users as $user) {+ foreach ($this->users as $user) {/** @var Configuration $config */- $config = AppConfiguration::get(sprintf('last_rt_job_%d', $user->id), 0);- $lastTime = (int)$config->data;- $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;+ $config = AppConfiguration::get(sprintf('last_rt_job_%d', $user->id), 0);+ $lastTime = (int) $config->data;+ $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;$diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);if (0 === $lastTime) {@@ -61,9 +61,13 @@ class RecurringCronjob extends AbstractCronjobLog::info(sprintf('It has been "%s" since the recurring transactions cron-job has fired for user #%d.', $diffForHumans, $user->id));if (false === $this->force || false === $user->hasRole('owner')) {Log::info(sprintf('The cron-job will not fire now for user #%d.', $user->id));- $this->message = sprintf('It has been "%s" since the recurring transactions cron-job has fired for user #%d. It will not fire now.', $diffForHumans, $user->id);- $this->jobFired = false;- $this->jobErrored = false;+ $this->message = sprintf(+ 'It has been "%s" since the recurring transactions cron-job has fired for user #%d. It will not fire now.',+ $diffForHumans,+ $user->id+ );+ $this->jobFired = false;+ $this->jobErrored = false;$this->jobSucceeded = false;return;@@ -72,7 +76,11 @@ class RecurringCronjob extends AbstractCronjob}if ($lastTime > 0 && $diff > 43_200) {- Log::info(sprintf('It has been "%s" since the recurring transactions cron-job has fired. It will fire now for user #%d!', $diffForHumans, $user->id));+ Log::info(sprintf(+ 'It has been "%s" since the recurring transactions cron-job has fired. It will fire now for user #%d!',+ $diffForHumans,+ $user->id+ ));}$this->fireRecurring($user);@@ -96,7 +104,12 @@ class RecurringCronjob extends AbstractCronjob$this->message = 'Recurring transactions cron job fired successfully.';AppConfiguration::set(sprintf('last_rt_job_%d', $user->id), (int) $this->date->format('U'));- Log::info(sprintf('Marked the last time this job has run as "%s" (%d) for user #%d', $this->date->format('Y-m-d H:i:s'), (int) $this->date->format('U'), $user->id));+ Log::info(sprintf(+ 'Marked the last time this job has run as "%s" (%d) for user #%d',+ $this->date->format('Y-m-d H:i:s'),+ (int) $this->date->format('U'),+ $user->id+ ));Log::info('Done with recurring cron job task.');}}diff --git a/app/Support/Cronjobs/WebhookCronjob.php b/app/Support/Cronjobs/WebhookCronjob.phpindex 7966aea7c2..c56c77e6ee 100644--- a/app/Support/Cronjobs/WebhookCronjob.php+++ b/app/Support/Cronjobs/WebhookCronjob.php@@ -44,13 +44,13 @@ class WebhookCronjob extends AbstractCronjobpublic function fire(): void{Log::debug(sprintf('Now in %s', __METHOD__));- /** @var User $user */- foreach($this->users as $user) {+ /** @var User $user */+ foreach ($this->users as $user) {/** @var Configuration $config */- $config = AppConfiguration::get(sprintf('last_webhook_job_%d', $user->id), 0);- $lastTime = (int)$config->data;- $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;+ $config = AppConfiguration::get(sprintf('last_webhook_job_%d', $user->id), 0);+ $lastTime = (int) $config->data;+ $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;$diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);if (0 === $lastTime) {@@ -61,9 +61,9 @@ class WebhookCronjob extends AbstractCronjobLog::info(sprintf('It has been %s since the webhook cron-job has fired for user #%d.', $diffForHumans, $user->id));if (false === $this->force || false === $user->hasRole('owner')) {Log::info(sprintf('The cron-job will not fire now for user #%d.', $user->id));- $this->message = sprintf('It has been %s since the webhook cron-job has fired. It will not fire now.', $diffForHumans);- $this->jobFired = false;- $this->jobErrored = false;+ $this->message = sprintf('It has been %s since the webhook cron-job has fired. It will not fire now.', $diffForHumans);+ $this->jobFired = false;+ $this->jobErrored = false;$this->jobSucceeded = false;return;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/Http/Controllers/CronRunner.php b/app/Support/Http/Controllers/CronRunner.phpindex c54b20ae6d..daa073c242 100644--- a/app/Support/Http/Controllers/CronRunner.php+++ b/app/Support/Http/Controllers/CronRunner.php@@ -41,16 +41,17 @@ use Illuminate\Support\Collection;trait CronRunner{protected UserRepositoryInterface $repository;+protected function billWarningCronJob(User $user, bool $force, Carbon $date): array{/** @var BillWarningCronjob $billWarning */$billWarning = app(BillWarningCronjob::class);$billWarning->setForce($force);// if the user is owner, run for all users.- $users = new Collection([$user]);- if($user->hasRole('owner')) {+ $users = new Collection([$user]);+ if ($user->hasRole('owner')) {$this->repository = app(UserRepositoryInterface::class);- $users = $this->repository->allAvailable();+ $users = $this->repository->allAvailable();}$billWarning->setUsers($users);$billWarning->setDate($date);@@ -76,10 +77,10 @@ trait CronRunner$exchangeRates->setForce($force);// if the user is owner, run for all users.- $users = new Collection([$user]);- if($user->hasRole('owner')) {+ $users = new Collection([$user]);+ if ($user->hasRole('owner')) {$this->repository = app(UserRepositoryInterface::class);- $users = $this->repository->allAvailable();+ $users = $this->repository->allAvailable();}$exchangeRates->setUsers($users);$exchangeRates->setDate($date);@@ -104,10 +105,10 @@ trait CronRunner$autoBudget = app(AutoBudgetCronjob::class);$autoBudget->setForce($force);// if the user is owner, run for all users.- $users = new Collection([$user]);- if($user->hasRole('owner')) {+ $users = new Collection([$user]);+ if ($user->hasRole('owner')) {$this->repository = app(UserRepositoryInterface::class);- $users = $this->repository->allAvailable();+ $users = $this->repository->allAvailable();}$autoBudget->setUsers($users);$autoBudget->setDate($date);@@ -133,10 +134,10 @@ trait CronRunner$recurring->setForce($force);// if the user is owner, run for all users.- $users = new Collection([$user]);- if($user->hasRole('owner')) {+ $users = new Collection([$user]);+ if ($user->hasRole('owner')) {$this->repository = app(UserRepositoryInterface::class);- $users = $this->repository->allAvailable();+ $users = $this->repository->allAvailable();}$recurring->setUsers($users);$recurring->setDate($date);@@ -161,10 +162,10 @@ trait CronRunner$webhook = app(WebhookCronjob::class);$webhook->setForce($force);// if the user is owner, run for all users.- $users = new Collection([$user]);- if($user->hasRole('owner')) {+ $users = new Collection([$user]);+ if ($user->hasRole('owner')) {$this->repository = app(UserRepositoryInterface::class);- $users = $this->repository->allAvailable();+ $users = $this->repository->allAvailable();}$webhook->setUsers($users);$webhook->setDate($date);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/config/firefly.php b/config/firefly.phpindex 13623e3cc8..c9ae1b7cbc 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-08-28',-'build_time' => 1787888474,+'build_time' => 1787909344,'api_version' => '2.1.0', // field is no longer used.'db_version' => 28, // field is no longer used.