mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 03:53:37 +00:00
Fix ibans
This commit is contained in:
@@ -60,18 +60,16 @@ class FixIbans extends Command
|
|||||||
{
|
{
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
$iban = $account->iban;
|
$iban = (string) $account->iban;
|
||||||
if (str_contains($iban, ' ')) {
|
$newIban = app('steam')->filterSpaces($iban);
|
||||||
$iban = app('steam')->filterSpaces((string)$account->iban);
|
if ('' !== $iban && $iban !== $newIban) {
|
||||||
if ('' !== $iban) {
|
$account->iban = $newIban;
|
||||||
$account->iban = $iban;
|
|
||||||
$account->save();
|
$account->save();
|
||||||
$this->friendlyInfo(sprintf('Removed spaces from IBAN of account #%d', $account->id));
|
$this->friendlyInfo(sprintf('Removed spaces from IBAN of account #%d', $account->id));
|
||||||
++$this->count;
|
++$this->count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private function countAndCorrectIbans(Collection $accounts): void
|
private function countAndCorrectIbans(Collection $accounts): void
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user