gnucash maint: Bug 783283 - Multi-Currency payments use wrong date
Geert Janssens
gjanssens at code.gnucash.org
Wed Mar 17 11:58:28 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/f91b35b4 (commit)
from https://github.com/Gnucash/gnucash/commit/5bf3bfc6 (commit)
commit f91b35b4443eb9e158db5bf133a39c17a06135c7
Author: Geert Janssens <geert at kobaltwit.be>
Date: Wed Mar 17 16:58:02 2021 +0100
Bug 783283 - Multi-Currency payments use wrong date
Also properly handles the user clicking the cancel button on the transfer dialog
It will now just return to the payment window, waiting for further user input.
diff --git a/gnucash/gnome/dialog-payment.c b/gnucash/gnome/dialog-payment.c
index 89a9e0480..ab3a33ddd 100644
--- a/gnucash/gnome/dialog-payment.c
+++ b/gnucash/gnome/dialog-payment.c
@@ -1004,6 +1004,7 @@ gnc_payment_ok_cb (G_GNUC_UNUSED GtkWidget *widget, gpointer data)
gnc_xfer_dialog_select_to_account(xfer, pw->xfer_acct);
gnc_xfer_dialog_set_amount(xfer, pw->amount_tot);
+ gnc_xfer_dialog_set_date (xfer, t);
/* All we want is the exchange rate so prevent the user from thinking
it makes sense to mess with other stuff */
@@ -1012,7 +1013,9 @@ gnc_payment_ok_cb (G_GNUC_UNUSED GtkWidget *widget, gpointer data)
gnc_xfer_dialog_hide_from_account_tree(xfer);
gnc_xfer_dialog_hide_to_account_tree(xfer);
gnc_xfer_dialog_is_exchange_dialog(xfer, &exch);
- gnc_xfer_dialog_run_until_done(xfer);
+
+ if (!gnc_xfer_dialog_run_until_done(xfer))
+ return; /* If the user cancels, return to the payment dialog without changes */
}
/* Perform the payment */
Summary of changes:
gnucash/gnome/dialog-payment.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list