r21249 - gnucash/trunk/src/plugins/bi_import - Inverted conditions for gnc_search_bill_on_id / gnc_search_invoice_on_id. g_ascii_strcasecmp returns 0 when arguments are equal.

Geert Janssens gjanssens at code.gnucash.org
Sun Sep 11 10:24:14 EDT 2011


Author: gjanssens
Date: 2011-09-11 10:24:13 -0400 (Sun, 11 Sep 2011)
New Revision: 21249
Trac: http://svn.gnucash.org/trac/changeset/21249

Modified:
   gnucash/trunk/src/plugins/bi_import/bi_import.c
Log:
Inverted conditions for gnc_search_bill_on_id / gnc_search_invoice_on_id. g_ascii_strcasecmp returns 0 when arguments are equal.

Modified: gnucash/trunk/src/plugins/bi_import/bi_import.c
===================================================================
--- gnucash/trunk/src/plugins/bi_import/bi_import.c	2011-09-11 14:24:04 UTC (rev 21248)
+++ gnucash/trunk/src/plugins/bi_import/bi_import.c	2011-09-11 14:24:13 UTC (rev 21249)
@@ -559,9 +559,9 @@
         // no predefined invoice number is a new invoice that's in need of a new number.
         // This was  not designed to satisfy the need for repeat invoices however, so maybe we need a another method for this, after all
         // It should be easier to copy an invoice with a new ID than to go through all this malarky.
-        if (g_ascii_strcasecmp (type, "BILL"))
+        if (g_ascii_strcasecmp (type, "BILL") == 0)
             invoice = gnc_search_bill_on_id (book, id);
-        else if (g_ascii_strcasecmp (type, "INVOICE"))
+        else if (g_ascii_strcasecmp (type, "INVOICE") == 0)
             invoice = gnc_search_invoice_on_id (book, id);
 
         if (!invoice)



More information about the gnucash-changes mailing list