summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2019-02-05 08:27:25 -0500
committerMartin Michlmayr <tbm@cyrius.com>2019-02-05 08:27:25 -0500
commit0bbb976ee3064ff59b319e30fd97e31020259760 (patch)
tree5d13986511c18d911b0d1b2dc498b0f81d3a3b0e /src/xact.cc
parent9de94d4adb7a566af38814f9d37e26c559b68b4f (diff)
parent7a5871d3b53e66ee261bea4b41512e99269b18b1 (diff)
downloadfork-ledger-0bbb976ee3064ff59b319e30fd97e31020259760.tar.gz
fork-ledger-0bbb976ee3064ff59b319e30fd97e31020259760.tar.bz2
fork-ledger-0bbb976ee3064ff59b319e30fd97e31020259760.zip
Merge branch 'next' into release/3.1.2
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/xact.cc b/src/xact.cc
index d29072d4..10a7106a 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -395,10 +395,12 @@ bool xact_base_t::finalize()
some_null = true;
}
- if (post->has_flags(POST_DEFERRED))
- post->account->add_deferred_post(id(), post);
- else
- post->account->add_post(post);
+ if (post->has_flags(POST_DEFERRED)) {
+ if (!post->amount.is_null())
+ 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 +808,10 @@ 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 flags so this post updates the account balance
+ new_post->xdata().add_flags(POST_EXT_VISITED);
+ new_post->account->xdata().add_flags(ACCOUNT_EXT_VISITED);
+
if (new_post->must_balance())
needs_further_verification = true;
}