From 14dcb277778568b9c5b60612e4f696363db4de11 Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Tue, 23 Oct 2012 13:07:39 -0700 Subject: Implemented Bug551 Automatic Transactions are cleared base on parent --- src/xact.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/xact.cc') 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, -- cgit v1.2.3