diff --git a/ChangeLog b/ChangeLog index bcfd20cc2c..e28cabffc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2003-01-02 Derek Atkins + * src/business/business-core/gncInvoice.c: set the lot title to + " " (e.g., "Invoice 000001" or + "Bill I2-34") when posting an invoice. We already assume + one invoice to a lot. + * src/business/business-reports/aging.scm: When computing the aging report, ignore splits that belong to closed lots. This way we wont get the wrong values when the invoice falls outside the 360-day diff --git a/src/business/business-core/gncInvoice.c b/src/business/business-core/gncInvoice.c index a92094e47b..5735a2e56f 100644 --- a/src/business/business-core/gncInvoice.c +++ b/src/business/business-core/gncInvoice.c @@ -750,7 +750,7 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc, GList *splitinfo = NULL; gnc_numeric total; gboolean reverse; - const char *name, *type; + const char *name, *type, *lot_title; Account *ccard_acct = NULL; GncOwner *owner; @@ -791,12 +791,18 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc, if (!lot) lot = gnc_lot_new (invoice->inst.book); + type = gncInvoiceGetType (invoice); + + /* Set the lot title */ + lot_title = g_strdup_printf ("%s %s", type, gncInvoiceGetID (invoice)); + gnc_lot_set_title (lot, lot_title); + g_free (lot_title); + /* Create a new transaction */ txn = xaccMallocTransaction (invoice->inst.book); xaccTransBeginEdit (txn); name = gncOwnerGetName (gncOwnerGetEndOwner (gncInvoiceGetOwner (invoice))); - type = gncInvoiceGetType (invoice); /* Set Transaction Description (Owner Name) , Num (invoice ID), Currency */ xaccTransSetDescription (txn, name ? name : "");