From 25f106d299d0b067e257843e398acc15d66ac49b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 2 Mar 2009 04:56:18 -0400 Subject: The entry command always creates uncleared items --- src/derive.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/derive.cc') diff --git a/src/derive.cc b/src/derive.cc index 6abb22e1..4730af00 100644 --- a/src/derive.cc +++ b/src/derive.cc @@ -255,6 +255,8 @@ namespace { else added->_date = tmpl.date; + added->set_state(item_t::UNCLEARED); + if (matching) { added->payee = matching->payee; added->code = matching->code; @@ -270,8 +272,10 @@ namespace { if (tmpl.posts.empty()) { if (matching) { - foreach (post_t * post, matching->posts) + foreach (post_t * post, matching->posts) { added->add_post(new post_t(*post)); + added->posts.back()->set_state(item_t::UNCLEARED); + } } else { throw_(std::runtime_error, _("No accounts, and no past transaction matching '%1'") @@ -368,6 +372,7 @@ namespace { } added->add_post(new_post.release()); + added->posts.back()->set_state(item_t::UNCLEARED); } } -- cgit v1.2.3