Skip to content

Firefly III: a personal finances manager

Fix https://github.com/firefly-iii/firefly-iii/issues/6625

James Cole7fcdf85dee24
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;