mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Set val_imbalance in gnc_transaction_balance_trading.
When the code was refactored in 61973a8
the return value from the new
function gnc_transaction_get_commodity_imbalance was ignored. This had
the effect of using an uninitialized variable to set the value in a new
trading account split that is not for the transaction's currency. That
means that multicommodity transactions created with this bug and trading
accounts on will not be balanced.
This commit is contained in:
parent
9b3711533f
commit
d4bbede08f
@ -673,7 +673,7 @@ gnc_transaction_balance_trading (Transaction *trans, Account *root)
|
||||
|
||||
if (! gnc_commodity_equal (txn_curr, commodity))
|
||||
{
|
||||
gnc_transaction_get_commodity_imbalance (trans, commodity);
|
||||
val_imbalance = gnc_transaction_get_commodity_imbalance (trans, commodity);
|
||||
}
|
||||
|
||||
xaccTransBeginEdit (trans);
|
||||
|
Loading…
Reference in New Issue
Block a user