mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[Bug 683222] Display the "to amount" in the exchange rate dialog
when it is first shown. Also updated some comments to be more accurate. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22383 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e1bd508f61
commit
54d1d0fa7f
@ -2240,9 +2240,9 @@ gboolean gnc_xfer_dialog_run_exchange_dialog(
|
||||
if (xaccTransUseTradingAccounts (txn))
|
||||
{
|
||||
/* If we're using commodity trading accounts then "amount" is
|
||||
really the split's amount and it's in xfer_com. We need an
|
||||
exchange rate that will convert this amount into a value in
|
||||
the transaction currency. */
|
||||
really the split's amount and it's in xfer_com commodity.
|
||||
We need an exchange rate that will convert this amount
|
||||
into a value in the transaction currency. */
|
||||
if (gnc_commodity_equal(xfer_com, txn_cur))
|
||||
{
|
||||
/* Transaction is in the same currency as the split, exchange
|
||||
@ -2251,15 +2251,15 @@ gboolean gnc_xfer_dialog_run_exchange_dialog(
|
||||
return FALSE;
|
||||
}
|
||||
swap_amounts = expanded;
|
||||
|
||||
/* We know that "amount" is always in the reg_com currency.
|
||||
* Unfortunately it is possible that neither xfer_com or txn_cur are
|
||||
* the same as reg_com, in which case we need to convert to the txn
|
||||
* currency... Or, if the register commodity is the xfer_com, then we
|
||||
* need to flip-flop the commodities and the exchange rates.
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
/* We know that "amount" is always in the reg_com currency.
|
||||
* Unfortunately it is possible that neither xfer_com or txn_cur are
|
||||
* the same as reg_com, in which case we need to convert to the txn
|
||||
* currency... Or, if the register commodity is the xfer_com, then we
|
||||
* need to flip-flop the commodities and the exchange rates.
|
||||
*/
|
||||
|
||||
else if (gnc_commodity_equal(reg_com, txn_cur))
|
||||
{
|
||||
/* we're working in the txn currency. Great. Nothing to do! */
|
||||
@ -2311,6 +2311,8 @@ gboolean gnc_xfer_dialog_run_exchange_dialog(
|
||||
gnc_xfer_dialog_hide_from_account_tree(xfer);
|
||||
|
||||
gnc_xfer_dialog_set_amount(xfer, amount);
|
||||
/* Now that from amount is set, set the to amount. */
|
||||
gnc_xfer_update_to_amount(xfer);
|
||||
|
||||
/*
|
||||
* When we flip, we should tell the dialog so it can deal with the
|
||||
|
Loading…
Reference in New Issue
Block a user