r17422 - gnucash/branches/gda-dev2/src/business/business-core/sql - Fix parent/child relationships in tax tables when loading from db.

Phil Longstaff plongstaff at cvs.gnucash.org
Sun Jul 27 11:35:41 EDT 2008


Author: plongstaff
Date: 2008-07-27 11:35:41 -0400 (Sun, 27 Jul 2008)
New Revision: 17422
Trac: http://svn.gnucash.org/trac/changeset/17422

Modified:
   gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-tax-table-sql.c
Log:
Fix parent/child relationships in tax tables when loading from db.



Modified: gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-tax-table-sql.c
===================================================================
--- gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-tax-table-sql.c	2008-07-27 15:33:23 UTC (rev 17421)
+++ gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-tax-table-sql.c	2008-07-27 15:35:41 UTC (rev 17422)
@@ -70,8 +70,8 @@
 	{ "refcount",  CT_INT64,       0,            COL_NNUL,          NULL, GNC_TT_REFCOUNT },
 	{ "invisible", CT_BOOLEAN,     0,            COL_NNUL,          NULL, NULL,
 			(QofAccessFunc)gncTaxTableGetInvisible, (QofSetterFunc)set_invisible },
-	{ "child",     CT_TAXTABLEREF, 0,			 0,                 NULL, NULL,
-			get_child, (QofSetterFunc)gncTaxTableSetChild },
+/*	{ "child",     CT_TAXTABLEREF, 0,			 0,                 NULL, NULL,
+			get_child, (QofSetterFunc)gncTaxTableSetChild }, */
 	{ "parent",    CT_TAXTABLEREF, 0,			 0,                 NULL, NULL,
 			(QofAccessFunc)gncTaxTableGetParent, set_parent },
 	{ NULL }
@@ -153,6 +153,7 @@
 	if( value != NULL ) {
 		parent = GNC_TAXTABLE(value);
 		gncTaxTableSetParent( tt, parent );
+		gncTaxTableSetChild( parent, tt );
 	}
 }
 



More information about the gnucash-changes mailing list