diff --git a/ChangeLog b/ChangeLog index 55f7f15fca..a64ad15b88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-12-04 Derek Atkins + * 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. diff --git a/src/business/business-core/gncInvoice.c b/src/business/business-core/gncInvoice.c index a5d3eaefe9..3ab24483aa 100644 --- a/src/business/business-core/gncInvoice.c +++ b/src/business/business-core/gncInvoice.c @@ -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; }