summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2019-01-25 15:47:22 -0800
committerGitHub <noreply@github.com>2019-01-25 15:47:22 -0800
commit4b7100a2caa5f9837d051d6ab385d5d521916735 (patch)
treef7792c213375db829ada44dd3feb7d0d59e88168 /src
parent6828b8e89bdd9328c81e81e98088143786559976 (diff)
parentf3bad93db256db07b6cb831d4d24f47543f57e4a (diff)
downloadfork-ledger-4b7100a2caa5f9837d051d6ab385d5d521916735.tar.gz
fork-ledger-4b7100a2caa5f9837d051d6ab385d5d521916735.tar.bz2
fork-ledger-4b7100a2caa5f9837d051d6ab385d5d521916735.zip
Merge pull request #1745 from mbudde/ignore-null-deferred-postings
Ignore null deferred postings
Diffstat (limited to 'src')
-rw-r--r--src/xact.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xact.cc b/src/xact.cc
index 5df9ebc5..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
+ 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);