mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Fix issue with reconciliation displayed amount.
This commit is contained in:
@@ -280,10 +280,16 @@ class TransactionGroupTwig extends AbstractExtension
|
||||
$amount = bcmul($amount, '-1');
|
||||
}
|
||||
$destinationType = $array['destination_account_type'] ?? 'invalid';
|
||||
// opening balance and it goes to initial balance? its expense.
|
||||
if ($type === TransactionType::OPENING_BALANCE && AccountType::INITIAL_BALANCE === $destinationType) {
|
||||
$amount = bcmul($amount, '-1');
|
||||
}
|
||||
|
||||
// reconciliation and it goes to reconciliation?
|
||||
if ($type === TransactionType::RECONCILIATION && AccountType::RECONCILIATION === $destinationType) {
|
||||
$amount = bcmul($amount, '-1');
|
||||
}
|
||||
|
||||
if ($type === TransactionType::TRANSFER) {
|
||||
$colored = false;
|
||||
}
|
||||
|
@@ -155,6 +155,18 @@ TODO: hide and show columns
|
||||
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elseif transaction.transaction_type_type == 'Reconciliation' %}
|
||||
{% if transaction.source_account_type == 'Reconciliation account' %}
|
||||
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||
{% if null != transaction.foreign_amount %}
|
||||
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||
{% if null != transaction.foreign_amount %}
|
||||
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||
{% if null != transaction.foreign_amount %}
|
||||
|
Reference in New Issue
Block a user