The entry command always creates uncleared items
This commit is contained in:
parent
ce206a392a
commit
25f106d299
1 changed files with 6 additions and 1 deletions
|
|
@ -255,6 +255,8 @@ namespace {
|
||||||
else
|
else
|
||||||
added->_date = tmpl.date;
|
added->_date = tmpl.date;
|
||||||
|
|
||||||
|
added->set_state(item_t::UNCLEARED);
|
||||||
|
|
||||||
if (matching) {
|
if (matching) {
|
||||||
added->payee = matching->payee;
|
added->payee = matching->payee;
|
||||||
added->code = matching->code;
|
added->code = matching->code;
|
||||||
|
|
@ -270,8 +272,10 @@ namespace {
|
||||||
|
|
||||||
if (tmpl.posts.empty()) {
|
if (tmpl.posts.empty()) {
|
||||||
if (matching) {
|
if (matching) {
|
||||||
foreach (post_t * post, matching->posts)
|
foreach (post_t * post, matching->posts) {
|
||||||
added->add_post(new post_t(*post));
|
added->add_post(new post_t(*post));
|
||||||
|
added->posts.back()->set_state(item_t::UNCLEARED);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw_(std::runtime_error,
|
throw_(std::runtime_error,
|
||||||
_("No accounts, and no past transaction matching '%1'")
|
_("No accounts, and no past transaction matching '%1'")
|
||||||
|
|
@ -368,6 +372,7 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
added->add_post(new_post.release());
|
added->add_post(new_post.release());
|
||||||
|
added->posts.back()->set_state(item_t::UNCLEARED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue