r17215 - gnucash/branches/gda-dev2/src/backend/file - For first template sx account, don't create a new template commodity.
Phil Longstaff
plongstaff at cvs.gnucash.org
Wed Jun 11 19:00:35 EDT 2008
Author: plongstaff
Date: 2008-06-11 19:00:35 -0400 (Wed, 11 Jun 2008)
New Revision: 17215
Trac: http://svn.gnucash.org/trac/changeset/17215
Modified:
gnucash/branches/gda-dev2/src/backend/file/gnc-schedxaction-xml-v2.c
Log:
For first template sx account, don't create a new template commodity.
Reuse the already existing one.
Modified: gnucash/branches/gda-dev2/src/backend/file/gnc-schedxaction-xml-v2.c
===================================================================
--- gnucash/branches/gda-dev2/src/backend/file/gnc-schedxaction-xml-v2.c 2008-06-11 15:37:50 UTC (rev 17214)
+++ gnucash/branches/gda-dev2/src/backend/file/gnc-schedxaction-xml-v2.c 2008-06-11 23:00:35 UTC (rev 17215)
@@ -781,6 +781,13 @@
pre-7/11/2001-CIT-change SX template Account was parsed [but
incorrectly]. */
if ( xaccAccountGetCommodity( acc ) == NULL ) {
+#if 1
+ gnc_commodity_table* table;
+
+ table = gnc_commodity_table_get_table( txd->book );
+ com = gnc_commodity_table_lookup( table,
+ "template", "template" );
+#else
/* FIXME: This should first look in the table of the
book, maybe? The right thing happens [WRT file
load/save] if we just _new all the time, but it
@@ -792,6 +799,7 @@
"template", "template",
"template", "template",
1 );
+#endif
xaccAccountSetCommodity( acc, com );
}
More information about the gnucash-changes
mailing list