r20087 - gnucash/trunk/src/business/business-gnome - Bug #639365: Revert r18546 so that the bills-due dialog displays only bills but not invoices.
Christian Stimming
cstim at code.gnucash.org
Thu Jan 13 14:05:59 EST 2011
Author: cstim
Date: 2011-01-13 14:05:59 -0500 (Thu, 13 Jan 2011)
New Revision: 20087
Trac: http://svn.gnucash.org/trac/changeset/20087
Modified:
gnucash/trunk/src/business/business-gnome/dialog-invoice.c
Log:
Bug #639365: Revert r18546 so that the bills-due dialog displays only bills but not invoices.
The INVOICE_TYPE string unfortunately is
stored in translated form due to the usage of gncInvoiceGetType()
for user-visible strings as well. Hence, as an exception we
must also search for the translated here even though it's an
internal flag.
Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2011-01-13 17:25:26 UTC (rev 20086)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2011-01-13 19:05:59 UTC (rev 20087)
@@ -2698,7 +2698,7 @@
/* we want to find all invoices where:
* invoice -> is_posted == TRUE
* AND invoice -> lot -> is_closed? == FALSE
- * AND invoice -> type != "Invoice"
+ * AND invoice -> type != _("Invoice") // note: currently the translated form
* AND invoice -> due >= (today - days_in_advance)
*/
@@ -2708,10 +2708,12 @@
qof_query_add_boolean_match (q, g_slist_prepend(g_slist_prepend(NULL, LOT_IS_CLOSED),
INVOICE_POST_LOT), FALSE, QOF_QUERY_AND);
- /* Watch out: Do *not* translate the string "Invoice" here because
- it must match the QofObject.type_label string exactly, which
- implies it is used in untranslated form! */
- pred_data = qof_query_string_predicate (QOF_COMPARE_NEQ, "Invoice",
+ /* Bug#602091, #639365: The INVOICE_TYPE string unfortunately is
+ * stored in translated form due to the usage of gncInvoiceGetType
+ * for user-visible strings as well. Hence, as an exception we
+ * must also search for the translated here even though it's an
+ * internal flag. */
+ pred_data = qof_query_string_predicate (QOF_COMPARE_NEQ, _("Invoice"),
QOF_STRING_MATCH_NORMAL, FALSE);
qof_query_add_term (q, g_slist_prepend(NULL, INVOICE_TYPE), pred_data, QOF_QUERY_AND);
More information about the gnucash-changes
mailing list