mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-07-30 08:08:15 -05:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user