mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug #635439: Fix "Pay invoice" while the invoice dialog is open.
Patch by Matthijs Kooijman <matthijs@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. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19854 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -463,8 +463,8 @@ new_payment_window (GncOwner *owner, QofBook *book, GncInvoice *invoice)
|
||||
|
||||
/*
|
||||
* 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 @@ new_payment_window (GncOwner *owner, QofBook *book, GncInvoice *invoice)
|
||||
{
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user