[Gnucash-changes] Revert the GNC_ID_OWNER -> QOF_TYPE_COLLECT so queries work again.

Derek Atkins warlord at cvs.gnucash.org
Mon Jul 25 14:10:57 EDT 2005


Log Message:
-----------
Revert the GNC_ID_OWNER -> QOF_TYPE_COLLECT so queries work again.

	* src/business/business-core/gncInvoice.c:  revert the
	  OWNER to GNC_ID_OWNER because it breaks lots of existing
	  queries.  QSF needs to find a better method, either using
	  a secondary entry into the parameter or coming up with a
	  new meta-type in QOF where you can implement GNC_ID_OWNER
	  in terms of the new metatype.  QOF_TYPE_COLLECT is absolutely
	  the WRONG answer for GNC_ID_OWNER.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/business/business-core:
        gncInvoice.c

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.251
retrieving revision 1.1487.2.252
diff -LChangeLog -LChangeLog -u -r1.1487.2.251 -r1.1487.2.252
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,13 @@
+2005-07-25  Derek Atkins  <derek at ihtfp.com>
+
+	* src/business/business-core/gncInvoice.c:  revert the
+	  OWNER to GNC_ID_OWNER because it breaks lots of existing
+	  queries.  QSF needs to find a better method, either using
+	  a secondary entry into the parameter or coming up with a
+	  new meta-type in QOF where you can implement GNC_ID_OWNER
+	  in terms of the new metatype.  QOF_TYPE_COLLECT is absolutely
+	  the WRONG answer for GNC_ID_OWNER.
+
 2005-07-24  David Hampton  <hampton at employees.org>
 
 	* various src/backend and src/business/business-core: Add gchar*
Index: gncInvoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncInvoice.c,v
retrieving revision 1.56.4.11
retrieving revision 1.56.4.12
diff -Lsrc/business/business-core/gncInvoice.c -Lsrc/business/business-core/gncInvoice.c -u -r1.56.4.11 -r1.56.4.12
--- src/business/business-core/gncInvoice.c
+++ src/business/business-core/gncInvoice.c
@@ -1548,7 +1548,7 @@
 {
   static QofParam params[] = {
     { INVOICE_ID,      QOF_TYPE_STRING, (QofAccessFunc)gncInvoiceGetID,     (QofSetterFunc)gncInvoiceSetID },
-    { INVOICE_OWNER,   QOF_TYPE_COLLECT, (QofAccessFunc)qofInvoiceGetOwner, (QofSetterFunc)qofInvoiceSetOwner  },
+    { INVOICE_OWNER,   GNC_ID_OWNER, (QofAccessFunc)gncInvoiceGetOwner, NULL },
     { INVOICE_OPENED,  QOF_TYPE_DATE,   (QofAccessFunc)gncInvoiceGetDateOpened, (QofSetterFunc)gncInvoiceSetDateOpened },
     { INVOICE_DUE,     QOF_TYPE_DATE,   (QofAccessFunc)gncInvoiceGetDateDue, NULL },
     { INVOICE_POSTED,  QOF_TYPE_DATE,   (QofAccessFunc)gncInvoiceGetDatePosted, (QofSetterFunc)gncInvoiceSetDatePosted },
@@ -1561,7 +1561,7 @@
     { INVOICE_POST_LOT, GNC_ID_LOT,     (QofAccessFunc)gncInvoiceGetPostedLot, NULL/*(QofSetterFunc)gncInvoiceSetPostedLot*/ },
     { INVOICE_TYPE,    QOF_TYPE_STRING, (QofAccessFunc)gncInvoiceGetType,    NULL },
     { INVOICE_TERMS,   GNC_ID_BILLTERM, (QofAccessFunc)gncInvoiceGetTerms,   (QofSetterFunc)gncInvoiceSetTerms },
-    { INVOICE_BILLTO,  QOF_TYPE_COLLECT, (QofAccessFunc)qofInvoiceGetBillTo, (QofSetterFunc)qofInvoiceSetBillTo  },
+    { INVOICE_BILLTO,  GNC_ID_OWNER, (QofAccessFunc)gncInvoiceGetBillTo, NULL  },
     { INVOICE_ENTRIES, QOF_TYPE_COLLECT, (QofAccessFunc)qofInvoiceGetEntries, (QofSetterFunc)qofInvoiceSetEntries },
     { INVOICE_JOB,     GNC_ID_JOB,      (QofAccessFunc)qofInvoiceGetJob,     (QofSetterFunc)qofInvoiceSetJob }, 
     { QOF_PARAM_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncInvoiceGetActive, (QofSetterFunc)gncInvoiceSetActive },
@@ -1574,6 +1574,14 @@
   reg_lot ();
   reg_txn ();
 
+  /* Make the compiler happy... */
+  if (0) {
+    qofInvoiceSetOwner(NULL, NULL);
+    qofInvoiceGetOwner(NULL);
+    qofInvoiceSetBillTo(NULL, NULL);
+    qofInvoiceGetBillTo(NULL);
+  }
+
   return qof_object_register (&gncInvoiceDesc);
 }
 


More information about the gnucash-changes mailing list