r23058 - gnucash/trunk/src/import-export/log-replay - Bug #669964: Fix txn creation that forgot to set a txn currency.
Christian Stimming
cstim at code.gnucash.org
Wed Jun 19 11:48:02 EDT 2013
Author: cstim
Date: 2013-06-19 11:48:02 -0400 (Wed, 19 Jun 2013)
New Revision: 23058
Trac: http://svn.gnucash.org/trac/changeset/23058
Modified:
gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
Log:
Bug #669964: Fix txn creation that forgot to set a txn currency.
Modified: gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
===================================================================
--- gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c 2013-06-19 15:47:49 UTC (rev 23057)
+++ gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c 2013-06-19 15:48:02 UTC (rev 23058)
@@ -479,6 +479,10 @@
{
acct = xaccAccountLookupDirect(record.acc_guid, book);
xaccAccountInsertSplit(acct, split);
+
+ // No currency in the txn yet? Set one now.
+ if (!xaccTransGetCurrency(trans))
+ xaccTransSetCurrency(trans, gnc_account_or_default_currency(acct, NULL));
}
if (is_new_split)
xaccTransAppendSplit(trans, split);
More information about the gnucash-changes
mailing list