diff options
author | Craig Earls <enderw88@gmail.com> | 2012-10-23 13:07:39 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2012-10-23 13:07:39 -0700 |
commit | 14dcb277778568b9c5b60612e4f696363db4de11 (patch) | |
tree | 03f893b61430d09c184f3ba8a9de2c078055a023 /src/xact.cc | |
parent | b1661b6c90f608f50f1e976125f554069a653f40 (diff) | |
download | fork-ledger-14dcb277778568b9c5b60612e4f696363db4de11.tar.gz fork-ledger-14dcb277778568b9c5b60612e4f696363db4de11.tar.bz2 fork-ledger-14dcb277778568b9c5b60612e4f696363db4de11.zip |
Implemented Bug551 Automatic Transactions are cleared base on parent
Diffstat (limited to 'src/xact.cc')
-rw-r--r-- | src/xact.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xact.cc b/src/xact.cc index a54da81a..ec1d372c 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -780,6 +780,14 @@ void auto_xact_t::extend_xact(xact_base_t& xact, parse_context_t& context) // the automated xact's one. post_t * new_post = new post_t(account, amt); new_post->copy_details(*post); + + // A Cleared transaction implies all of its automatic posting are cleared + // CPR 2012/10/23 + if(xact.state() == item_t::CLEARED){ + DEBUG("xact.extend.cleared", "CLEARED"); + new_post->set_state(item_t::CLEARED); + } + new_post->add_flags(ITEM_GENERATED); new_post->account = journal->register_account(account->fullname(), new_post, |