From f91b35b4443eb9e158db5bf133a39c17a06135c7 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Wed, 17 Mar 2021 16:58:02 +0100 Subject: [PATCH] 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. --- gnucash/gnome/dialog-payment.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnucash/gnome/dialog-payment.c b/gnucash/gnome/dialog-payment.c index 89a9e04808..ab3a33ddd7 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 */