diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-11 04:32:27 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-11 04:35:18 -0500 |
commit | f1b495abfea31f4777b74715631dd45f9f4d8ed1 (patch) | |
tree | 2d4e9c857c00ead220e06f063db22e8a2075d899 | |
parent | dae24c259ba70cfdba92a5d66bc424eef5773188 (diff) | |
download | fork-ledger-f1b495abfea31f4777b74715631dd45f9f4d8ed1.tar.gz fork-ledger-f1b495abfea31f4777b74715631dd45f9f4d8ed1.tar.bz2 fork-ledger-f1b495abfea31f4777b74715631dd45f9f4d8ed1.zip |
Added some missing calls to add_post
-rw-r--r-- | src/draft.cc | 2 | ||||
-rw-r--r-- | src/timelog.cc | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/draft.cc b/src/draft.cc index b4e23322..8478a31d 100644 --- a/src/draft.cc +++ b/src/draft.cc @@ -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()) { 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->posts.back()->account->add_post(added->posts.back()); added->posts.back()->set_state(item_t::UNCLEARED); DEBUG("derive.xact", "Added new posting to derived entry"); diff --git a/src/timelog.cc b/src/timelog.cc index b18c436b..25bf8e94 100644 --- a/src/timelog.cc +++ b/src/timelog.cc @@ -107,6 +107,7 @@ namespace { post->set_state(item_t::CLEARED); post->pos = event.position; curr->add_post(post); + event.account->add_post(post); if (! journal.add_xact(curr.get())) throw parse_error(_("Failed to record 'out' timelog transaction")); |