From e3248ee5a6b2c29e1c35eb0315fd66370a117784 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 20 Mar 2012 04:56:03 -0500 Subject: Fix problems with postings --- src/temps.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/temps.cc') diff --git a/src/temps.cc b/src/temps.cc index cb471d41..881077f6 100644 --- a/src/temps.cc +++ b/src/temps.cc @@ -81,7 +81,8 @@ post_t& temporaries_t::copy_post(post_t& origin, xact_t& xact, return temp; } -post_t& temporaries_t::create_post(xact_t& xact, account_t * account) +post_t& temporaries_t::create_post(xact_t& xact, account_t * account, + bool bidir_link) { if (! post_temps) post_temps = std::list(); @@ -93,7 +94,10 @@ post_t& temporaries_t::create_post(xact_t& xact, account_t * account) temp.account = account; temp.account->add_post(&temp); - xact.add_post(&temp); + if (bidir_link) + xact.add_post(&temp); + else + temp.xact = &xact; return temp; } -- cgit v1.2.3