Added some missing calls to add_post
This commit is contained in:
parent
dae24c259b
commit
f1b495abfe
2 changed files with 3 additions and 0 deletions
|
|
@ -420,6 +420,7 @@ xact_t * draft_t::insert(journal_t& journal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
assert(new_post->account);
|
||||||
|
|
||||||
if (new_post.get() && ! new_post->amount.is_null()) {
|
if (new_post.get() && ! new_post->amount.is_null()) {
|
||||||
found_commodity = &new_post->amount.commodity();
|
found_commodity = &new_post->amount.commodity();
|
||||||
|
|
@ -475,6 +476,7 @@ xact_t * draft_t::insert(journal_t& journal)
|
||||||
}
|
}
|
||||||
|
|
||||||
added->add_post(new_post.release());
|
added->add_post(new_post.release());
|
||||||
|
added->posts.back()->account->add_post(added->posts.back());
|
||||||
added->posts.back()->set_state(item_t::UNCLEARED);
|
added->posts.back()->set_state(item_t::UNCLEARED);
|
||||||
|
|
||||||
DEBUG("derive.xact", "Added new posting to derived entry");
|
DEBUG("derive.xact", "Added new posting to derived entry");
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ namespace {
|
||||||
post->set_state(item_t::CLEARED);
|
post->set_state(item_t::CLEARED);
|
||||||
post->pos = event.position;
|
post->pos = event.position;
|
||||||
curr->add_post(post);
|
curr->add_post(post);
|
||||||
|
event.account->add_post(post);
|
||||||
|
|
||||||
if (! journal.add_xact(curr.get()))
|
if (! journal.add_xact(curr.get()))
|
||||||
throw parse_error(_("Failed to record 'out' timelog transaction"));
|
throw parse_error(_("Failed to record 'out' timelog transaction"));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue