diff options
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)); } |