r17350 - gnucash/branches/gda-dev2/src/business/business-core - 1) In gncBillTermSetParent(), don't make the bill terms invisible if the
Phil Longstaff
plongstaff at cvs.gnucash.org
Sun Jul 20 10:49:55 EDT 2008
Author: plongstaff
Date: 2008-07-20 10:49:55 -0400 (Sun, 20 Jul 2008)
New Revision: 17350
Trac: http://svn.gnucash.org/trac/changeset/17350
Modified:
gnucash/branches/gda-dev2/src/business/business-core/gncBillTerm.c
gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-bill-term-sql.c
Log:
1) In gncBillTermSetParent(), don't make the bill terms invisible if the
parent is NULL.
2) Fix boolean check (remove '!') which was backwards and causing CRIT
messages when saving bill terms.
Modified: gnucash/branches/gda-dev2/src/business/business-core/gncBillTerm.c
===================================================================
--- gnucash/branches/gda-dev2/src/business/business-core/gncBillTerm.c 2008-07-20 13:55:03 UTC (rev 17349)
+++ gnucash/branches/gda-dev2/src/business/business-core/gncBillTerm.c 2008-07-20 14:49:55 UTC (rev 17350)
@@ -367,7 +367,9 @@
if (parent)
gncBillTermAddChild(parent, term);
term->refcount = 0;
- gncBillTermMakeInvisible (term);
+ if( parent != NULL ) {
+ gncBillTermMakeInvisible (term);
+ }
gncBillTermCommitEdit (term);
}
Modified: gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-bill-term-sql.c
===================================================================
--- gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-bill-term-sql.c 2008-07-20 13:55:03 UTC (rev 17349)
+++ gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-bill-term-sql.c 2008-07-20 14:49:55 UTC (rev 17350)
@@ -170,7 +170,7 @@
gnc_sql_save_billterm( GncSqlBackend* be, QofInstance* inst )
{
g_return_if_fail( inst != NULL );
- g_return_if_fail( !GNC_IS_BILLTERM(inst) );
+ g_return_if_fail( GNC_IS_BILLTERM(inst) );
g_return_if_fail( be != NULL );
gnc_sql_commit_standard_item( be, inst, TABLE_NAME, GNC_ID_BILLTERM, col_table );
More information about the gnucash-changes
mailing list