2001-08-31 Dave Peticolas <dave@krondo.com>

* src/engine/Scrub.c: don't create accounts with new currency


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5249 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-08-31 19:50:25 +00:00
parent acae7efd73
commit 400f084ae8
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2001-08-31 Dave Peticolas <dave@krondo.com>
* src/engine/Scrub.c: don't create accounts with no currency
2001-08-30 Robert Graham Merkel <rgmerk@mira.net>
* src/gnome/dialog-sx-from-trans.{ch}: New files, providing easy way
@ -21,8 +25,6 @@
* src/gnome/window-register.c: added code to let user activate
SX-from-trans dialog
2001-08-25 Christian Stimming <stimming@tuhh.de>
* src/gnome/gnc-html-guppi.c: activate the [xy]_axis_label

View File

@ -127,6 +127,8 @@ xaccTransScrubOrphans (Transaction *trans, AccountGroup *root)
DEBUG ("Found an orphan \n");
orph = GetOrMakeAccount (root, trans, _("Orphan"));
if (!orph)
continue;
xaccAccountBeginEdit (orph);
xaccAccountInsertSplit (orph, split);
@ -314,6 +316,9 @@ xaccTransScrubImbalance (Transaction *trans, AccountGroup *root,
else
account = parent;
if (!account)
return;
for (node = xaccTransGetSplitList (trans); node; node = node->next)
{
Split *split = node->data;
@ -477,6 +482,11 @@ GetOrMakeAccount (AccountGroup *root, Transaction *trans,
/* build the account name */
currency = xaccTransGetCurrency (trans);
if (!currency)
{
PERR ("Transaction with no currency");
return NULL;
}
accname = g_strconcat (name_root, "-",
gnc_commodity_get_mnemonic (currency), NULL);