From 7fcdf85dee248200cec0b1f4926c771ea6f1d0c0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 9 Nov 2022 20:49:27 +0100 Subject: [PATCH] Fix https://github.com/firefly-iii/firefly-iii/issues/6625 --- app/Support/Twig/TransactionGroupTwig.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Support/Twig/TransactionGroupTwig.php b/app/Support/Twig/TransactionGroupTwig.php index 2c0a38fbb4..83f6051eca 100644 --- a/app/Support/Twig/TransactionGroupTwig.php +++ b/app/Support/Twig/TransactionGroupTwig.php @@ -221,7 +221,7 @@ class TransactionGroupTwig extends AbstractExtension /** @var Transaction $first */ $first = $journal->transactions()->where('amount', '<', 0)->first(); - return null !== $first->foreign_amount; + return '' !== $first->foreign_amount; } /** @@ -237,7 +237,7 @@ class TransactionGroupTwig extends AbstractExtension /** @var Transaction $first */ $first = $journal->transactions()->where('amount', '<', 0)->first(); $currency = $first->foreignCurrency; - $amount = $first->foreign_amount ?? '0'; + $amount = '' === $first->foreign_amount ? '0' : $first->foreign_amount; $colored = true; $sourceType = $first->account()->first()->accountType()->first()->type;