* src/business/business-core/gncInvoice.c: set the lot title to

"<Invoice Type> <Invoice ID>" (e.g., "Invoice 000001" or
	  "Bill I2-34") when posting an invoice.  We already assume
	  one invoice to a lot.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9747 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins
2004-01-02 22:38:29 +00:00
parent 2572ceb7b9
commit 1cede8ddbf
2 changed files with 13 additions and 2 deletions

View File

@@ -1,5 +1,10 @@
2003-01-02 Derek Atkins <derek@ihtfp.com>
* src/business/business-core/gncInvoice.c: set the lot title to
"<Invoice Type> <Invoice ID>" (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

View File

@@ -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 : "");