r19854 - gnucash/trunk/src/business/business-gnome - Bug #635439: Fix "Pay invoice" while the invoice dialog is open.
Christian Stimming
cstim at code.gnucash.org
Sun Nov 21 15:17:42 EST 2010
Author: cstim
Date: 2010-11-21 15:17:41 -0500 (Sun, 21 Nov 2010)
New Revision: 19854
Trac: http://svn.gnucash.org/trac/changeset/19854
Modified:
gnucash/trunk/src/business/business-gnome/dialog-payment.c
Log:
Bug #635439: Fix "Pay invoice" while the invoice dialog is open.
Patch by Matthijs Kooijman <matthijs at stdin.nl>:
If you use "Pay invoice", normally a new payment dialog is opened which
is completely filled in. However, when there was already a dialog open,
it was reused but only the owner would be filled in. This patch makes
sure that the invoice and amount are filled in as well.
Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.c 2010-11-21 20:17:29 UTC (rev 19853)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.c 2010-11-21 20:17:41 UTC (rev 19854)
@@ -463,8 +463,8 @@
/*
* Find an existing payment window. If found, bring it to
- * the front. If we have an actual owner, then set it in
- * the window.
+ * the front. If we have an actual owner and/or invoice, then set
+ * it in the window.
*/
pw = gnc_find_first_gui_component (cm_class, find_handler, NULL);
@@ -472,6 +472,8 @@
{
if (owner->owner.undefined)
gnc_payment_set_owner (pw, owner);
+ if (invoice)
+ gnc_invoice_set_invoice (pw->invoice_choice, invoice);
gtk_window_present (GTK_WINDOW(pw->dialog));
return(pw);
More information about the gnucash-changes
mailing list