From 64ea59e4ec47327e8c3ae84594adc4a3275a66e4 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 8 Nov 2023 04:56:06 +0100 Subject: [PATCH] Fix https://github.com/firefly-iii/firefly-iii/issues/8137 --- app/Console/Commands/Correction/FixUnevenAmount.php | 4 ++-- app/Support/Steam.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/Correction/FixUnevenAmount.php b/app/Console/Commands/Correction/FixUnevenAmount.php index d0d949cf24..fb532f4ca3 100644 --- a/app/Console/Commands/Correction/FixUnevenAmount.php +++ b/app/Console/Commands/Correction/FixUnevenAmount.php @@ -120,7 +120,7 @@ class FixUnevenAmount extends Command ) ); Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete(); - TransactionJournal::where('id', $journal->description ?? 0)->forceDelete(); + TransactionJournal::where('id', $journal->id ?? 0)->forceDelete(); return; } @@ -141,7 +141,7 @@ class FixUnevenAmount extends Command ); Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete(); - TransactionJournal::where('id', $journal->description ?? 0)->forceDelete(); + TransactionJournal::where('id', $journal->id ?? 0)->forceDelete(); return; } diff --git a/app/Support/Steam.php b/app/Support/Steam.php index ca8bb33c38..28bbc051c2 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -164,8 +164,8 @@ class Steam /** @var Transaction $entry */ foreach ($set as $entry) { // normal amount and foreign amount - $modified = null === $entry->modified ? '0' : $entry->modified; - $foreignModified = null === $entry->modified_foreign ? '0' :$entry->modified_foreign; + $modified = (string) (null === $entry->modified ? '0' : $entry->modified); + $foreignModified = (string) (null === $entry->modified_foreign ? '0' :$entry->modified_foreign); $amount = '0'; if ($currencyId === (int)$entry->transaction_currency_id || 0 === $currencyId) { // use normal amount: