summaryrefslogtreecommitdiff
path: root/gnucash.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-09-30 07:02:31 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-09-30 07:02:31 +0000
commit5bd2401bc7cde0e01cd5b9d18cf077e255c4bd45 (patch)
treebcc3d57e446c3c7b9c91888bda2fa02d61423e96 /gnucash.cc
parentff57781f1fc80024ae6387f29b2f06278acadb3b (diff)
downloadfork-ledger-5bd2401bc7cde0e01cd5b9d18cf077e255c4bd45.tar.gz
fork-ledger-5bd2401bc7cde0e01cd5b9d18cf077e255c4bd45.tar.bz2
fork-ledger-5bd2401bc7cde0e01cd5b9d18cf077e255c4bd45.zip
*** empty log message ***
Diffstat (limited to 'gnucash.cc')
-rw-r--r--gnucash.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/gnucash.cc b/gnucash.cc
index f4c48042..fb768cd8 100644
--- a/gnucash.cc
+++ b/gnucash.cc
@@ -18,9 +18,9 @@ static amount * curr_value;
static std::string curr_quant;
static XML_Parser current_parser;
-accounts_t accounts_by_id;
+static accounts_t accounts_by_id;
-enum {
+static enum {
NO_ACTION,
ACCOUNT_NAME,
ACCOUNT_ID,
@@ -97,7 +97,8 @@ static void endElement(void *userData, const char *name)
{
if (std::strcmp(name, "gnc:account") == 0) {
assert(curr_account);
- accounts.insert(accounts_entry(curr_account->name, curr_account));
+ if (! curr_account->parent)
+ accounts.insert(accounts_entry(curr_account->name, curr_account));
accounts_by_id.insert(accounts_entry(curr_account_id, curr_account));
curr_account = NULL;
}