summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2018-03-24 15:24:46 -0700
committerGitHub <noreply@github.com>2018-03-24 15:24:46 -0700
commit916641f9a0e88f5315c23a2209c6221f6e5bce0f (patch)
treeb360bea61915a90f5d22b2197744738826eac65f /src
parentfbccb7149eae348182bef7ac9dcba756fe72381d (diff)
parenta534869733efd57dffeb19a3d52b23eca75ee80c (diff)
downloadfork-ledger-916641f9a0e88f5315c23a2209c6221f6e5bce0f.tar.gz
fork-ledger-916641f9a0e88f5315c23a2209c6221f6e5bce0f.tar.bz2
fork-ledger-916641f9a0e88f5315c23a2209c6221f6e5bce0f.zip
Merge pull request #552 from dedmons/fix-balance-assert-with-auto-xact
Fix auto xact posts not getting applied to account total durring journal parse
Diffstat (limited to 'src')
-rw-r--r--src/xact.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/xact.cc b/src/xact.cc
index d29072d4..c62974df 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -396,9 +396,9 @@ bool xact_base_t::finalize()
}
if (post->has_flags(POST_DEFERRED))
- post->account->add_deferred_post(id(), post);
- else
- post->account->add_post(post);
+ post->account->add_deferred_post(id(), post);
+ else
+ post->account->add_post(post);
post->xdata().add_flags(POST_EXT_VISITED);
post->account->xdata().add_flags(ACCOUNT_EXT_VISITED);
@@ -806,6 +806,9 @@ void auto_xact_t::extend_xact(xact_base_t& xact, parse_context_t& context)
xact.add_post(new_post);
new_post->account->add_post(new_post);
+ // Add flag so this post updates the account balance
+ new_post->xdata().add_flags(POST_EXT_VISITED);
+
if (new_post->must_balance())
needs_further_verification = true;
}