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 (xaccTransUseTradingAccounts (txn))
|
||||||
{
|
{
|
||||||
/* If we're using commodity trading accounts then "amount" is
|
/* If we're using commodity trading accounts then "amount" is
|
||||||
really the split's amount and it's in xfer_com. We need an
|
really the split's amount and it's in xfer_com commodity.
|
||||||
exchange rate that will convert this amount into a value in
|
We need an exchange rate that will convert this amount
|
||||||
the transaction currency. */
|
into a value in the transaction currency. */
|
||||||
if (gnc_commodity_equal(xfer_com, txn_cur))
|
if (gnc_commodity_equal(xfer_com, txn_cur))
|
||||||
{
|
{
|
||||||
/* Transaction is in the same currency as the split, exchange
|
/* Transaction is in the same currency as the split, exchange
|
||||||
@ -2251,6 +2251,7 @@ gboolean gnc_xfer_dialog_run_exchange_dialog(
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
swap_amounts = expanded;
|
swap_amounts = expanded;
|
||||||
|
}
|
||||||
|
|
||||||
/* We know that "amount" is always in the reg_com currency.
|
/* We know that "amount" is always in the reg_com currency.
|
||||||
* Unfortunately it is possible that neither xfer_com or txn_cur are
|
* Unfortunately it is possible that neither xfer_com or txn_cur are
|
||||||
@ -2259,7 +2260,6 @@ gboolean gnc_xfer_dialog_run_exchange_dialog(
|
|||||||
* need to flip-flop the commodities and the exchange rates.
|
* need to flip-flop the commodities and the exchange rates.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
|
||||||
else if (gnc_commodity_equal(reg_com, txn_cur))
|
else if (gnc_commodity_equal(reg_com, txn_cur))
|
||||||
{
|
{
|
||||||
/* we're working in the txn currency. Great. Nothing to do! */
|
/* 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_hide_from_account_tree(xfer);
|
||||||
|
|
||||||
gnc_xfer_dialog_set_amount(xfer, amount);
|
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
|
* When we flip, we should tell the dialog so it can deal with the
|
||||||
|
Loading…
Reference in New Issue
Block a user