mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* 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:
@@ -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
|
||||
|
||||
@@ -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 : "");
|
||||
|
||||
Reference in New Issue
Block a user