🤖 Auto commit for release 'develop' on 2025-12-28

This commit is contained in:
JC5
2025-12-28 06:59:39 +01:00
parent f0e2f09da7
commit ff3a935e9d
7 changed files with 74 additions and 70 deletions

View File

@@ -84,8 +84,7 @@ class CorrectsAmounts extends Command
/** @var AccountRepositoryInterface $repository */ /** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepositoryInterface::class); $repository = app(AccountRepositoryInterface::class);
$type = TransactionType::where('type', TransactionTypeEnum::TRANSFER->value)->first(); $type = TransactionType::where('type', TransactionTypeEnum::TRANSFER->value)->first();
$journals = TransactionJournal:: $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.*']);
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 */ /** @var TransactionJournal $journal */
foreach ($journals as $journal) { foreach ($journals as $journal) {

View File

@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers; namespace FireflyIII\Http\Controllers;
use FireflyIII\Support\Facades\Navigation;
use FireflyIII\Support\Facades\Preferences; use FireflyIII\Support\Facades\Preferences;
use Carbon\Carbon; use Carbon\Carbon;
use Carbon\Exceptions\InvalidFormatException; use Carbon\Exceptions\InvalidFormatException;

View File

@@ -79,6 +79,7 @@ class AccountBalanceCalculator
{ {
if (!$notBefore instanceof Carbon) { if (!$notBefore instanceof Carbon) {
Log::debug(sprintf('Start balance for account #%d and currency #%d is 0.', $accountId, $currencyId)); Log::debug(sprintf('Start balance for account #%d and currency #%d is 0.', $accountId, $currencyId));
return '0'; return '0';
} }
Log::debug(sprintf('getLatestBalance: notBefore date is "%s", calculating', $notBefore->format('Y-m-d'))); Log::debug(sprintf('getLatestBalance: notBefore date is "%s", calculating', $notBefore->format('Y-m-d')));

View File

@@ -79,10 +79,10 @@ class Navigation
if (!array_key_exists($repeatFreq, $functionMap)) { if (!array_key_exists($repeatFreq, $functionMap)) {
Log::error(sprintf( Log::error(sprintf(
'The periodicity %s is unknown. Choose one of available periodicity: %s', 'The periodicity %s is unknown. Choose one of available periodicity: %s',
$repeatFreq, $repeatFreq,
implode(', ', array_keys($functionMap)) implode(', ', array_keys($functionMap))
)); ));
return $theDate; return $theDate;
} }
@@ -95,7 +95,7 @@ class Navigation
if ($end < $start) { if ($end < $start) {
[$start, $end] = [$end, $start]; [$start, $end] = [$end, $start];
} }
$periods = []; $periods = [];
// first, 13 periods of [range] // first, 13 periods of [range]
$loopCount = 0; $loopCount = 0;
$loopDate = clone $end; $loopDate = clone $end;
@@ -153,7 +153,7 @@ class Navigation
public function diffInPeriods(string $period, int $skip, Carbon $beginning, Carbon $end): int public function diffInPeriods(string $period, int $skip, Carbon $beginning, Carbon $end): int
{ {
Log::debug(sprintf('diffInPeriods: %s (skip: %d), between %s and %s.', $period, $skip, $beginning->format('Y-m-d'), $end->format('Y-m-d'))); Log::debug(sprintf('diffInPeriods: %s (skip: %d), between %s and %s.', $period, $skip, $beginning->format('Y-m-d'), $end->format('Y-m-d')));
$map = [ $map = [
'daily' => 'diffInDays', 'daily' => 'diffInDays',
'weekly' => 'diffInWeeks', 'weekly' => 'diffInWeeks',
'monthly' => 'diffInMonths', 'monthly' => 'diffInMonths',
@@ -166,7 +166,7 @@ class Navigation
return 1; return 1;
} }
$func = $map[$period]; $func = $map[$period];
// first do the diff // first do the diff
$floatDiff = $beginning->{$func}($end, true); // @phpstan-ignore-line $floatDiff = $beginning->{$func}($end, true); // @phpstan-ignore-line
@@ -181,7 +181,7 @@ class Navigation
} }
// then do ceil() // then do ceil()
$diff = ceil($floatDiff); $diff = ceil($floatDiff);
Log::debug(sprintf('Diff is %f periods (%d rounded up)', $floatDiff, $diff)); Log::debug(sprintf('Diff is %f periods (%d rounded up)', $floatDiff, $diff));
@@ -189,11 +189,11 @@ class Navigation
$parameter = $skip + 1; $parameter = $skip + 1;
$diff = ceil($diff / $parameter) * $parameter; $diff = ceil($diff / $parameter) * $parameter;
Log::debug(sprintf( Log::debug(sprintf(
'diffInPeriods: skip is %d, so param is %d, and diff becomes %d', 'diffInPeriods: skip is %d, so param is %d, and diff becomes %d',
$skip, $skip,
$parameter, $parameter,
$diff $diff
)); ));
} }
return (int)$diff; return (int)$diff;
@@ -201,7 +201,7 @@ class Navigation
public function endOfPeriod(Carbon $end, string $repeatFreq): Carbon public function endOfPeriod(Carbon $end, string $repeatFreq): Carbon
{ {
$currentEnd = clone $end; $currentEnd = clone $end;
// Log::debug(sprintf('Now in endOfPeriod("%s", "%s").', $currentEnd->toIso8601String(), $repeatFreq)); // Log::debug(sprintf('Now in endOfPeriod("%s", "%s").', $currentEnd->toIso8601String(), $repeatFreq));
if ('MTD' === $repeatFreq && $end->isFuture()) { if ('MTD' === $repeatFreq && $end->isFuture()) {
@@ -251,7 +251,7 @@ class Navigation
Log::debug('Session data available.'); Log::debug('Session data available.');
/** @var Carbon $tStart */ /** @var Carbon $tStart */
$tStart = session('start', today(config('app.timezone'))->startOfMonth()); $tStart = session('start', today(config('app.timezone'))->startOfMonth());
/** @var Carbon $tEnd */ /** @var Carbon $tEnd */
$tEnd = session('end', today(config('app.timezone'))->endOfMonth()); $tEnd = session('end', today(config('app.timezone'))->endOfMonth());
@@ -287,7 +287,7 @@ class Navigation
return $end->endOfMonth(); return $end->endOfMonth();
} }
$result = match ($repeatFreq) { $result = match ($repeatFreq) {
'last7' => $currentEnd->addDays(7)->startOfDay(), 'last7' => $currentEnd->addDays(7)->startOfDay(),
'last30' => $currentEnd->addDays(30)->startOfDay(), 'last30' => $currentEnd->addDays(30)->startOfDay(),
'last90' => $currentEnd->addDays(90)->startOfDay(), 'last90' => $currentEnd->addDays(90)->startOfDay(),
@@ -303,12 +303,17 @@ class Navigation
switch ($repeatFreq) { switch ($repeatFreq) {
case 'QTD': case 'QTD':
$currentEnd->endOfQuarter()->setMilli(0); $currentEnd->endOfQuarter()->setMilli(0);
break; break;
case 'MTD': case 'MTD':
$currentEnd->endOfMonth()->setMilli(0); $currentEnd->endOfMonth()->setMilli(0);
break; break;
case 'YTD': case 'YTD':
$currentEnd->endOfYear()->setMilli(0); $currentEnd->endOfYear()->setMilli(0);
break; break;
} }
if ($currentEnd->lt($end)) { if ($currentEnd->lt($end)) {
@@ -330,7 +335,7 @@ class Navigation
return $end; return $end;
} }
$function = $functionMap[$repeatFreq]; $function = $functionMap[$repeatFreq];
if (array_key_exists($repeatFreq, $modifierMap)) { if (array_key_exists($repeatFreq, $modifierMap)) {
$currentEnd->{$function}($modifierMap[$repeatFreq])->milli(0); // @phpstan-ignore-line $currentEnd->{$function}($modifierMap[$repeatFreq])->milli(0); // @phpstan-ignore-line
@@ -380,7 +385,7 @@ class Navigation
'yearly' => 'endOfYear', 'yearly' => 'endOfYear',
]; ];
$currentEnd = clone $theCurrentEnd; $currentEnd = clone $theCurrentEnd;
if (array_key_exists($repeatFreq, $functionMap)) { if (array_key_exists($repeatFreq, $functionMap)) {
$function = $functionMap[$repeatFreq]; $function = $functionMap[$repeatFreq];
@@ -423,7 +428,7 @@ class Navigation
*/ */
public function listOfPeriods(Carbon $start, Carbon $end): array public function listOfPeriods(Carbon $start, Carbon $end): array
{ {
$locale = Steam::getLocale(); $locale = Steam::getLocale();
// define period to increment // define period to increment
$increment = 'addDay'; $increment = 'addDay';
$format = $this->preferredCarbonFormat($start, $end); $format = $this->preferredCarbonFormat($start, $end);
@@ -440,8 +445,8 @@ class Navigation
$increment = 'addYear'; $increment = 'addYear';
$displayFormat = (string)trans('config.year_js'); $displayFormat = (string)trans('config.year_js');
} }
$begin = clone $start; $begin = clone $start;
$entries = []; $entries = [];
while ($begin < $end) { while ($begin < $end) {
$formatted = $begin->format($format); $formatted = $begin->format($format);
$displayed = $begin->isoFormat($displayFormat); $displayed = $begin->isoFormat($displayFormat);
@@ -624,9 +629,9 @@ class Navigation
public function startOfPeriod(Carbon $theDate, string $repeatFreq): Carbon public function startOfPeriod(Carbon $theDate, string $repeatFreq): Carbon
{ {
$date = clone $theDate; $date = clone $theDate;
// Log::debug(sprintf('Now in startOfPeriod("%s", "%s")', $date->toIso8601String(), $repeatFreq)); // Log::debug(sprintf('Now in startOfPeriod("%s", "%s")', $date->toIso8601String(), $repeatFreq));
$functionMap = [ $functionMap = [
'1D' => 'startOfDay', '1D' => 'startOfDay',
'daily' => 'startOfDay', 'daily' => 'startOfDay',
'1W' => 'startOfWeek', '1W' => 'startOfWeek',
@@ -673,7 +678,7 @@ class Navigation
return $date; return $date;
} }
$result = match ($repeatFreq) { $result = match ($repeatFreq) {
'last7' => $date->subDays(7)->startOfDay(), 'last7' => $date->subDays(7)->startOfDay(),
'last30' => $date->subDays(30)->startOfDay(), 'last30' => $date->subDays(30)->startOfDay(),
'last90' => $date->subDays(90)->startOfDay(), 'last90' => $date->subDays(90)->startOfDay(),
@@ -705,7 +710,7 @@ class Navigation
public function subtractPeriod(Carbon $theDate, string $repeatFreq, ?int $subtract = null): Carbon public function subtractPeriod(Carbon $theDate, string $repeatFreq, ?int $subtract = null): Carbon
{ {
$subtract ??= 1; $subtract ??= 1;
$date = clone $theDate; $date = clone $theDate;
// 1D 1W 1M 3M 6M 1Y // 1D 1W 1M 3M 6M 1Y
$functionMap = [ $functionMap = [
'1D' => 'subDays', '1D' => 'subDays',
@@ -744,7 +749,7 @@ class Navigation
// this is then subtracted from $theDate (* $subtract). // this is then subtracted from $theDate (* $subtract).
if ('custom' === $repeatFreq) { if ('custom' === $repeatFreq) {
/** @var Carbon $tStart */ /** @var Carbon $tStart */
$tStart = session('start', today(config('app.timezone'))->startOfMonth()); $tStart = session('start', today(config('app.timezone'))->startOfMonth());
/** @var Carbon $tEnd */ /** @var Carbon $tEnd */
$tEnd = session('end', today(config('app.timezone'))->endOfMonth()); $tEnd = session('end', today(config('app.timezone'))->endOfMonth());
@@ -838,7 +843,7 @@ class Navigation
return $fiscalHelper->endOfFiscalYear($end); return $fiscalHelper->endOfFiscalYear($end);
} }
$list = [ $list = [
'last7', 'last7',
'last30', 'last30',
'last90', 'last90',

70
composer.lock generated
View File

@@ -1182,24 +1182,24 @@
}, },
{ {
"name": "graham-campbell/result-type", "name": "graham-campbell/result-type",
"version": "v1.1.3", "version": "v1.1.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/GrahamCampbell/Result-Type.git", "url": "https://github.com/GrahamCampbell/Result-Type.git",
"reference": "3ba905c11371512af9d9bdd27d99b782216b6945" "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/e01f4a821471308ba86aa202fed6698b6b695e3b",
"reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"phpoption/phpoption": "^1.9.3" "phpoption/phpoption": "^1.9.5"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" "phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -1228,7 +1228,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/GrahamCampbell/Result-Type/issues", "issues": "https://github.com/GrahamCampbell/Result-Type/issues",
"source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.4"
}, },
"funding": [ "funding": [
{ {
@@ -1240,7 +1240,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-07-20T21:45:45+00:00" "time": "2025-12-27T19:43:20+00:00"
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
@@ -2813,16 +2813,16 @@
}, },
{ {
"name": "league/csv", "name": "league/csv",
"version": "9.27.1", "version": "9.28.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/csv.git", "url": "https://github.com/thephpleague/csv.git",
"reference": "26de738b8fccf785397d05ee2fc07b6cd8749797" "reference": "6582ace29ae09ba5b07049d40ea13eb19c8b5073"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/csv/zipball/26de738b8fccf785397d05ee2fc07b6cd8749797", "url": "https://api.github.com/repos/thephpleague/csv/zipball/6582ace29ae09ba5b07049d40ea13eb19c8b5073",
"reference": "26de738b8fccf785397d05ee2fc07b6cd8749797", "reference": "6582ace29ae09ba5b07049d40ea13eb19c8b5073",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2832,14 +2832,14 @@
"require-dev": { "require-dev": {
"ext-dom": "*", "ext-dom": "*",
"ext-xdebug": "*", "ext-xdebug": "*",
"friendsofphp/php-cs-fixer": "^3.75.0", "friendsofphp/php-cs-fixer": "^3.92.3",
"phpbench/phpbench": "^1.4.1", "phpbench/phpbench": "^1.4.3",
"phpstan/phpstan": "^1.12.27", "phpstan/phpstan": "^1.12.32",
"phpstan/phpstan-deprecation-rules": "^1.2.1", "phpstan/phpstan-deprecation-rules": "^1.2.1",
"phpstan/phpstan-phpunit": "^1.4.2", "phpstan/phpstan-phpunit": "^1.4.2",
"phpstan/phpstan-strict-rules": "^1.6.2", "phpstan/phpstan-strict-rules": "^1.6.2",
"phpunit/phpunit": "^10.5.16 || ^11.5.22 || ^12.3.6", "phpunit/phpunit": "^10.5.16 || ^11.5.22 || ^12.5.4",
"symfony/var-dumper": "^6.4.8 || ^7.3.0" "symfony/var-dumper": "^6.4.8 || ^7.4.0 || ^8.0"
}, },
"suggest": { "suggest": {
"ext-dom": "Required to use the XMLConverter and the HTMLConverter classes", "ext-dom": "Required to use the XMLConverter and the HTMLConverter classes",
@@ -2900,7 +2900,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-10-25T08:35:20+00:00" "time": "2025-12-27T15:18:42+00:00"
}, },
{ {
"name": "league/event", "name": "league/event",
@@ -4749,16 +4749,16 @@
}, },
{ {
"name": "phpoption/phpoption", "name": "phpoption/phpoption",
"version": "1.9.4", "version": "1.9.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/schmittjoh/php-option.git", "url": "https://github.com/schmittjoh/php-option.git",
"reference": "638a154f8d4ee6a5cfa96d6a34dfbe0cffa9566d" "reference": "75365b91986c2405cf5e1e012c5595cd487a98be"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/638a154f8d4ee6a5cfa96d6a34dfbe0cffa9566d", "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/75365b91986c2405cf5e1e012c5595cd487a98be",
"reference": "638a154f8d4ee6a5cfa96d6a34dfbe0cffa9566d", "reference": "75365b91986c2405cf5e1e012c5595cd487a98be",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4808,7 +4808,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/schmittjoh/php-option/issues", "issues": "https://github.com/schmittjoh/php-option/issues",
"source": "https://github.com/schmittjoh/php-option/tree/1.9.4" "source": "https://github.com/schmittjoh/php-option/tree/1.9.5"
}, },
"funding": [ "funding": [
{ {
@@ -4820,7 +4820,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-08-21T11:53:16+00:00" "time": "2025-12-27T19:41:33+00:00"
}, },
{ {
"name": "phpseclib/phpseclib", "name": "phpseclib/phpseclib",
@@ -9918,26 +9918,26 @@
}, },
{ {
"name": "vlucas/phpdotenv", "name": "vlucas/phpdotenv",
"version": "v5.6.2", "version": "v5.6.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/vlucas/phpdotenv.git", "url": "https://github.com/vlucas/phpdotenv.git",
"reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af" "reference": "955e7815d677a3eaa7075231212f2110983adecc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/24ac4c74f91ee2c193fa1aaa5c249cb0822809af", "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/955e7815d677a3eaa7075231212f2110983adecc",
"reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af", "reference": "955e7815d677a3eaa7075231212f2110983adecc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-pcre": "*", "ext-pcre": "*",
"graham-campbell/result-type": "^1.1.3", "graham-campbell/result-type": "^1.1.4",
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"phpoption/phpoption": "^1.9.3", "phpoption/phpoption": "^1.9.5",
"symfony/polyfill-ctype": "^1.24", "symfony/polyfill-ctype": "^1.26",
"symfony/polyfill-mbstring": "^1.24", "symfony/polyfill-mbstring": "^1.26",
"symfony/polyfill-php80": "^1.24" "symfony/polyfill-php80": "^1.26"
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
@@ -9986,7 +9986,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/vlucas/phpdotenv/issues", "issues": "https://github.com/vlucas/phpdotenv/issues",
"source": "https://github.com/vlucas/phpdotenv/tree/v5.6.2" "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.3"
}, },
"funding": [ "funding": [
{ {
@@ -9998,7 +9998,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-04-30T23:37:27+00:00" "time": "2025-12-27T19:49:13+00:00"
}, },
{ {
"name": "voku/portable-ascii", "name": "voku/portable-ascii",

View File

@@ -78,8 +78,8 @@ return [
'running_balance_column' => (bool)envNonEmpty('USE_RUNNING_BALANCE', true), // this is only the default value, is not used. 'running_balance_column' => (bool)envNonEmpty('USE_RUNNING_BALANCE', true), // this is only the default value, is not used.
// see cer.php for exchange rates feature flag. // see cer.php for exchange rates feature flag.
], ],
'version' => 'develop/2025-12-27', 'version' => 'develop/2025-12-28',
'build_time' => 1766836093, 'build_time' => 1766901480,
'api_version' => '2.1.0', // field is no longer used. 'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used. 'db_version' => 28, // field is no longer used.

6
package-lock.json generated
View File

@@ -7082,9 +7082,9 @@
} }
}, },
"node_modules/i18next-chained-backend": { "node_modules/i18next-chained-backend": {
"version": "4.6.2", "version": "4.6.3",
"resolved": "https://registry.npmjs.org/i18next-chained-backend/-/i18next-chained-backend-4.6.2.tgz", "resolved": "https://registry.npmjs.org/i18next-chained-backend/-/i18next-chained-backend-4.6.3.tgz",
"integrity": "sha512-2P092fR+nAPQlGzPUoIIxbwo7PTBqQYgLxwv1XhSTQUAUoelLo5LkX+FqRxxSDg9WEAsrc8+2WL6mJtMGIa6WQ==", "integrity": "sha512-Yg4hAKg/98zRAMQs87vJSNevTzaPPrYF3Eb7Kpx+UEaaXLd3p69g7dulAL+hpmZQHeMQ/5gFqHVtdwva53mB0Q==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.23.2" "@babel/runtime": "^7.23.2"