James Cole 2022-11-09 20:49:27 +01:00
parent 704c6055b3
commit 7fcdf85dee
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -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;