diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-21 17:29:45 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-21 17:34:39 -0400 |
commit | ac5cc7796ff61eb116b815b13e4fda3d74bb6020 (patch) | |
tree | f862f1595523a80ed31298f2d393fc48f86f4bc7 /derive.cc | |
parent | 0a1bce0f8073cb40c0ca51046173d98f267074ea (diff) | |
parent | b1370b654da241ca7674b366e8007d1d6915094e (diff) | |
download | fork-ledger-ac5cc7796ff61eb116b815b13e4fda3d74bb6020.tar.gz fork-ledger-ac5cc7796ff61eb116b815b13e4fda3d74bb6020.tar.bz2 fork-ledger-ac5cc7796ff61eb116b815b13e4fda3d74bb6020.zip |
Merged in from master.
Diffstat (limited to 'derive.cc')
-rw-r--r-- | derive.cc | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -71,10 +71,21 @@ entry_t * derive_new_entry(journal_t& journal, } } - if (journal.basket) - acct = journal.basket; - else - acct = journal.find_account("Equity"); + acct = NULL; + + if (i != end) { + if (! acct) + acct = journal.find_account_re(*i); + if (! acct) + acct = journal.find_account(*i); + } + + if (! acct) { + if (journal.basket) + acct = journal.basket; + else + acct = journal.find_account("Equity"); + } added->add_transaction(new transaction_t(acct)); } |