diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-03 04:34:50 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:40:47 -0400 |
commit | a32173ace60df5a1e9414f5e95b556c436f62718 (patch) | |
tree | fff5b881c657fddb8543b0f787bfa75cf009a0b7 /autoxact.cc | |
parent | cc98b59d1e99238270eb307b117da8b0b35e6f27 (diff) | |
download | fork-ledger-a32173ace60df5a1e9414f5e95b556c436f62718.tar.gz fork-ledger-a32173ace60df5a1e9414f5e95b556c436f62718.tar.bz2 fork-ledger-a32173ace60df5a1e9414f5e95b556c436f62718.zip |
changes
Diffstat (limited to 'autoxact.cc')
-rw-r--r-- | autoxact.cc | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/autoxact.cc b/autoxact.cc deleted file mode 100644 index bed69e2e..00000000 --- a/autoxact.cc +++ /dev/null @@ -1,30 +0,0 @@ -#include "autoxact.h" - -namespace ledger { - -void automated_transaction_t::extend_entry(entry_t& entry) -{ - transactions_deque initial_xacts(entry.transactions.begin(), - entry.transactions.end()); - - for (transactions_deque::iterator i = initial_xacts.begin(); - i != initial_xacts.end(); - i++) - if (predicate(**i)) - for (transactions_deque::iterator t = transactions.begin(); - t != transactions.end(); - t++) { - amount_t amt; - if ((*t)->amount.commodity().symbol.empty()) - amt = (*i)->amount * (*t)->amount; - else - amt = (*t)->amount; - - transaction_t * xact - = new transaction_t((*t)->account, amt, - (*t)->flags | TRANSACTION_AUTO); - entry.add_transaction(xact); - } -} - -} // namespace ledger |