Send an 'invoice modified' event when a payment is applied (#139092).

* src/business/business-core/gncInvoice.c:
	  send an event when a payment is processed so the invoice gets
	  updated as "paid" in the search window.
	  Fixes #139092.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10356 57a11ea4-9604-0410-9ed3-97b8803252fd
zzzoldfeatures/cashutil
Derek Atkins 22 years ago
parent 8709330068
commit 6bd18fe4f1

@ -1,5 +1,10 @@
2004-12-04 Derek Atkins <derek@ihtfp.com>
* src/business/business-core/gncInvoice.c:
send an event when a payment is processed so the invoice gets
updated as "paid" in the search window.
Fixes #139092.
* src/business/business-gnome/dialog-vendor.c:
Make sure we set the proper search-type when we create the
query, otherwise the search will fail later.

@ -1161,6 +1161,7 @@ gncOwnerApplyPayment (GncOwner *owner, Account *posted_acc, Account *xfer_acc,
Split *split;
GList *lot_list, *fifo = NULL;
GNCLot *lot, *prepay_lot = NULL;
GncInvoice *invoice;
const char *name;
gnc_commodity *commodity;
gnc_numeric split_amt;
@ -1259,6 +1260,11 @@ gncOwnerApplyPayment (GncOwner *owner, Account *posted_acc, Account *xfer_acc,
xaccTransAppendSplit (txn, split);
gnc_lot_add_split (lot, split);
/* Now send an event for the invoice so it gets updated as paid */
invoice = gncInvoiceGetInvoiceFromLot(lot);
if (invoice)
gnc_engine_gen_event (&invoice->inst.entity, GNC_EVENT_MODIFY);
if (gnc_numeric_zero_p (amount))
break;
}

Loading…
Cancel
Save