AUDIT: r20554 - gnucash/trunk/src/engine - Bug #647360: Invoice entries in expense voucher are created in old voucher, not in new one.
Christian Stimming
cstim at code.gnucash.org
Sun Apr 10 16:18:39 EDT 2011
Author: cstim
Date: 2011-04-10 16:18:38 -0400 (Sun, 10 Apr 2011)
New Revision: 20554
Trac: http://svn.gnucash.org/trac/changeset/20554
Modified:
gnucash/trunk/src/engine/gncInvoice.c
Log:
Bug #647360: Invoice entries in expense voucher are created in old voucher, not in new one.
It worked fine for customer invoices, and vendor bills, but not
expense vouchers, where the feature was broken all along.
BP
Modified: gnucash/trunk/src/engine/gncInvoice.c
===================================================================
--- gnucash/trunk/src/engine/gncInvoice.c 2011-04-10 18:52:27 UTC (rev 20553)
+++ gnucash/trunk/src/engine/gncInvoice.c 2011-04-10 20:18:38 UTC (rev 20554)
@@ -354,13 +354,15 @@
GncEntry *to_entry = gncEntryCreate(book);
gncEntryCopy(from_entry, to_entry);
- if (gncInvoiceGetOwnerType (invoice) == GNC_OWNER_VENDOR)
+ switch (gncInvoiceGetOwnerType (invoice))
{
- // this is a vendor bill
+ case GNC_OWNER_VENDOR:
+ case GNC_OWNER_EMPLOYEE:
+ // this is a vendor bill, or an expense voucher
gncBillAddEntry(invoice, to_entry);
- }
- else
- {
+ break;
+ case GNC_OWNER_CUSTOMER:
+ default:
// this is an invoice
gncInvoiceAddEntry(invoice, to_entry);
}
More information about the gnucash-changes
mailing list