diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-10 17:54:47 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-10 17:54:47 -0400 |
commit | 7a1d0d46146ecdb79a156ea1197bc3f1bd30cb95 (patch) | |
tree | fcca3d58b29c119ff42e70a08c35007b3e399d82 /autoxact.cc | |
parent | 799e97e420133eb25a321f30a61f857831a93dac (diff) | |
download | fork-ledger-7a1d0d46146ecdb79a156ea1197bc3f1bd30cb95.tar.gz fork-ledger-7a1d0d46146ecdb79a156ea1197bc3f1bd30cb95.tar.bz2 fork-ledger-7a1d0d46146ecdb79a156ea1197bc3f1bd30cb95.zip |
new debug code; automated transactions now use value expression predicates
Diffstat (limited to 'autoxact.cc')
-rw-r--r-- | autoxact.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/autoxact.cc b/autoxact.cc index c49d1d38..7dac4512 100644 --- a/autoxact.cc +++ b/autoxact.cc @@ -4,11 +4,14 @@ namespace ledger { void automated_transaction_t::extend_entry(entry_t * entry) { - for (transactions_list::iterator i = entry->transactions.begin(); - i != entry->transactions.end(); + transactions_deque initial_xacts(entry->transactions.begin(), + entry->transactions.end()); + + for (transactions_deque::iterator i = initial_xacts.begin(); + i != initial_xacts.end(); i++) - if (matches(masks, *((*i)->account))) { - for (transactions_list::iterator t = transactions.begin(); + if (predicate(*i)) + for (transactions_deque::iterator t = transactions.begin(); t != transactions.end(); t++) { amount_t amt; @@ -22,7 +25,6 @@ void automated_transaction_t::extend_entry(entry_t * entry) (*t)->flags | TRANSACTION_AUTO); entry->add_transaction(xact); } - } } } // namespace ledger |