mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
🤖 Auto commit for release 'develop' on 2025-12-17
This commit is contained in:
@@ -43,6 +43,7 @@ use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use ValueError;
|
||||
use FireflyIII\Support\Facades\Steam;
|
||||
|
||||
class CorrectsAmounts extends Command
|
||||
{
|
||||
@@ -244,7 +245,7 @@ class CorrectsAmounts extends Command
|
||||
return false;
|
||||
}
|
||||
if (-1 === $check) {
|
||||
$item->trigger_value = \FireflyIII\Support\Facades\Steam::positive($item->trigger_value);
|
||||
$item->trigger_value = Steam::positive($item->trigger_value);
|
||||
$item->save();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -29,6 +29,7 @@ use FireflyIII\Enums\AccountTypeEnum;
|
||||
use FireflyIII\Models\Account;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Collection;
|
||||
use FireflyIII\Support\Facades\Steam;
|
||||
|
||||
class CorrectsIbans extends Command
|
||||
{
|
||||
@@ -55,7 +56,7 @@ class CorrectsIbans extends Command
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
$iban = (string) $account->iban;
|
||||
$newIban = \FireflyIII\Support\Facades\Steam::filterSpaces($iban);
|
||||
$newIban = Steam::filterSpaces($iban);
|
||||
if ('' !== $iban && $iban !== $newIban) {
|
||||
$account->iban = $newIban;
|
||||
$account->save();
|
||||
@@ -66,7 +67,7 @@ class CorrectsIbans extends Command
|
||||
$accountNumber = $account->accountMeta->where('name', 'account_number')->first();
|
||||
if (null !== $accountNumber) {
|
||||
$number = (string) $accountNumber->value;
|
||||
$newNumber = \FireflyIII\Support\Facades\Steam::filterSpaces($number);
|
||||
$newNumber = Steam::filterSpaces($number);
|
||||
if ('' !== $number && $number !== $newNumber) {
|
||||
$accountNumber->value = $newNumber;
|
||||
$accountNumber->save();
|
||||
|
||||
@@ -112,9 +112,9 @@ class CorrectsUnevenAmount extends Command
|
||||
if ($source->transaction_currency_id === $destination->transaction_currency_id) {
|
||||
Log::debug('Ready to swap data between transactions.');
|
||||
$destination->foreign_currency_id = $source->transaction_currency_id;
|
||||
$destination->foreign_amount = \FireflyIII\Support\Facades\Steam::positive($source->amount);
|
||||
$destination->foreign_amount = Steam::positive($source->amount);
|
||||
$destination->transaction_currency_id = $source->foreign_currency_id;
|
||||
$destination->amount = \FireflyIII\Support\Facades\Steam::positive($source->foreign_amount);
|
||||
$destination->amount = Steam::positive($source->foreign_amount);
|
||||
$destination->balance_dirty = true;
|
||||
$source->balance_dirty = true;
|
||||
$destination->save();
|
||||
|
||||
Reference in New Issue
Block a user