r21406 - gnucash/trunk/src/engine - Rename an ambiguous parameter to avoid confusion.
Geert Janssens
gjanssens at code.gnucash.org
Sun Oct 9 17:06:23 EDT 2011
Author: gjanssens
Date: 2011-10-09 17:06:23 -0400 (Sun, 09 Oct 2011)
New Revision: 21406
Trac: http://svn.gnucash.org/trac/changeset/21406
Modified:
gnucash/trunk/src/engine/gncInvoice.c
Log:
Rename an ambiguous parameter to avoid confusion.
Modified: gnucash/trunk/src/engine/gncInvoice.c
===================================================================
--- gnucash/trunk/src/engine/gncInvoice.c 2011-10-09 21:06:14 UTC (rev 21405)
+++ gnucash/trunk/src/engine/gncInvoice.c 2011-10-09 21:06:23 UTC (rev 21406)
@@ -792,11 +792,14 @@
{
GList *node;
gnc_numeric total = gnc_numeric_zero();
- gboolean reverse;
+ gboolean is_cust_doc;
g_return_val_if_fail (invoice, total);
- reverse = (gncInvoiceGetOwnerType (invoice) == GNC_OWNER_CUSTOMER);
+ /* Is the current document an invoice/credit note related to a customer or a vendor/employee ?
+ * The GncEntry code needs to know to return the proper entry amounts
+ */
+ is_cust_doc = (gncInvoiceGetOwnerType (invoice) == GNC_OWNER_CUSTOMER);
for (node = gncInvoiceGetEntries(invoice); node; node = node->next)
{
@@ -806,7 +809,7 @@
if (use_payment_type && gncEntryGetBillPayment (entry) != type)
continue;
- gncEntryGetValue (entry, reverse, &value, NULL, &tax, NULL);
+ gncEntryGetValue (entry, is_cust_doc, &value, NULL, &tax, NULL);
if (gnc_numeric_check (value) == GNC_ERROR_OK)
{
More information about the gnucash-changes
mailing list