r17419 - gnucash/branches/gda-dev2/src/business/business-core/sql - 1) "bill" in entry should be an invoice reference, not bill terms reference
Phil Longstaff
plongstaff at cvs.gnucash.org
Sun Jul 27 11:04:28 EDT 2008
Author: plongstaff
Date: 2008-07-27 11:04:17 -0400 (Sun, 27 Jul 2008)
New Revision: 17419
Trac: http://svn.gnucash.org/trac/changeset/17419
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-entry-sql.c
Log:
1) "bill" in entry should be an invoice reference, not bill terms reference
2) Fix handling of NULL bill terms reference
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-27 15:01:20 UTC (rev 17418)
+++ gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-bill-term-sql.c 2008-07-27 15:04:17 UTC (rev 17419)
@@ -199,7 +199,7 @@
g_return_if_fail( table_row != NULL );
val = gnc_sql_row_get_value_at_col_name( row, table_row->col_name );
- if( val == NULL ) {
+ if( val == NULL || !G_VALUE_HOLDS_STRING( val ) || g_value_get_string( val ) == NULL ) {
pGuid = NULL;
} else {
string_to_guid( g_value_get_string( val ), &guid );
Modified: gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-entry-sql.c
===================================================================
--- gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-entry-sql.c 2008-07-27 15:01:20 UTC (rev 17418)
+++ gnucash/branches/gda-dev2/src/business/business-core/sql/gnc-entry-sql.c 2008-07-27 15:04:17 UTC (rev 17419)
@@ -83,7 +83,7 @@
(QofAccessFunc)gncEntryGetInvTaxTable, (QofSetterFunc)gncEntrySetInvTaxTable },
{ "b_acct", CT_ACCOUNTREF, 0, 0, NULL, ENTRY_BACCT },
{ "b_price", CT_NUMERIC, 0, 0, NULL, ENTRY_BPRICE },
- { "bill", CT_BILLTERMREF, 0, 0, NULL, NULL,
+ { "bill", CT_INVOICEREF, 0, 0, NULL, NULL,
(QofAccessFunc)gncEntryGetBill, (QofSetterFunc)gncEntrySetBill },
{ "b_taxable", CT_BOOLEAN, 0, 0, NULL, ENTRY_BILL_TAXABLE },
{ "b_taxincluded", CT_BOOLEAN, 0, 0, NULL, ENTRY_BILL_TAX_INC },
More information about the gnucash-changes
mailing list