Allows for a simpler fix for #3382

This commit is contained in:
James Cole 2020-08-05 18:55:51 +02:00
parent 8df6356abf
commit 342626684b
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
2 changed files with 13 additions and 4 deletions

View File

@ -48,7 +48,6 @@ class TransactionGroupTwig extends AbstractExtension
return [
$this->journalArrayAmount(),
$this->journalObjectAmount(),
$this->groupAmount(),
$this->journalHasMeta(),
$this->journalGetMetaDate(),
$this->journalGetMetaField(),

View File

@ -14,10 +14,20 @@
{% endif %}
{% elseif transaction.transaction_type_type == 'Transfer' %}
<span class="text-info">
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places, false) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})
{# transfer away: #}
{% if transaction.source_account_id == account.id %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places, false) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})
{% endif %}
{% else %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places, false) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})
{% endif %}
{% endif %}
{# transfer to #}
</span>
{% elseif transaction.transaction_type_type == 'Opening balance' %}
{% if transaction.source_account_type == 'Initial balance account' %}