Implemented Bug551 Automatic Transactions are cleared base on parent
This commit is contained in:
parent
b1661b6c90
commit
14dcb27777
1 changed files with 8 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue