mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Negate amount in exchange rate dialog when swapping accounts.
This is the case when entering an amount for a split with an account whose base commodity equals the register's one, but differs from the transaction currency. Then, debit and credit accounts in the transfer dialog are swapped, so the amount should be negated as well. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17527 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
afdb73a911
commit
d7cad46659
@ -2113,6 +2113,7 @@ gboolean gnc_xfer_dialog_run_exchange_dialog(
|
||||
if (!gnc_numeric_zero_p(*exch_rate))
|
||||
*exch_rate = gnc_numeric_div(gnc_numeric_create(1, 1), *exch_rate,
|
||||
GNC_DENOM_AUTO, GNC_DENOM_REDUCE);
|
||||
amount = gnc_numeric_neg(amount);
|
||||
} else {
|
||||
gnc_xfer_dialog_select_to_currency(xfer, xfer_com);
|
||||
gnc_xfer_dialog_select_from_currency(xfer, txn_cur);
|
||||
|
Loading…
Reference in New Issue
Block a user