mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/gnome-utils/dialog-transfer.c: if we've got the 'exch rate'
button set, then make sure we update the to-amount before we use it. Also be sure to use the values we just obtained. Fixes #115991. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8729 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
bd501675e2
commit
f6747379e5
@ -4,6 +4,11 @@
|
||||
earnings" item under equity, and change the title to include
|
||||
the start date. Fixes (finally!) bug #113196
|
||||
|
||||
* src/gnome-utils/dialog-transfer.c: if we've got the 'exch rate'
|
||||
button set, then make sure we update the to-amount before we use
|
||||
it. Also be sure to use the values we just obtained.
|
||||
Fixes #115991.
|
||||
|
||||
2003-06-25 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/gnome-utils/dialog-transfer.h: Add callback handler that is
|
||||
|
@ -1424,11 +1424,17 @@ gnc_xfer_dialog_ok_cb(GtkWidget * widget, gpointer data)
|
||||
{
|
||||
gnc_numeric to_amt, from_amt;
|
||||
|
||||
/* If we've got the price-button set, then make sure we update the
|
||||
* to-amount before we use it.
|
||||
*/
|
||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(xferData->price_radio)))
|
||||
gnc_xfer_update_to_amount(xferData);
|
||||
|
||||
from_amt = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT(xferData->amount_edit));
|
||||
to_amt = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT(xferData->to_amount_edit));
|
||||
|
||||
*(xferData->exch_rate) =
|
||||
gnc_numeric_abs (gnc_numeric_div (to_amount, amount, GNC_DENOM_AUTO,
|
||||
gnc_numeric_abs (gnc_numeric_div (to_amt, from_amt, GNC_DENOM_AUTO,
|
||||
GNC_DENOM_REDUCE));
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user