diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-05 14:27:58 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-05 14:27:58 -0500 |
commit | 67ce33430c1f37f0fa7da62e5bd055c5a00b614d (patch) | |
tree | 3357a0a2fd100f8dbf65e01ae1272770852c3e23 /src/post.cc | |
parent | 15555d497f56e4b4d39e9a14f74b2c82cce52b90 (diff) | |
parent | 09ace752d604d5afce698f7cc240e1a83cee934d (diff) | |
download | fork-ledger-67ce33430c1f37f0fa7da62e5bd055c5a00b614d.tar.gz fork-ledger-67ce33430c1f37f0fa7da62e5bd055c5a00b614d.tar.bz2 fork-ledger-67ce33430c1f37f0fa7da62e5bd055c5a00b614d.zip |
Merge branch 'next'
Diffstat (limited to 'src/post.cc')
-rw-r--r-- | src/post.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/post.cc b/src/post.cc index d7923866..4f45592f 100644 --- a/src/post.cc +++ b/src/post.cc @@ -160,6 +160,8 @@ namespace { value_t get_amount(post_t& post) { if (post.has_xdata() && post.xdata().has_flags(POST_EXT_COMPOUND)) return post.xdata().compound_value; + else if (post.amount.is_null()) + return 0L; else return post.amount; } @@ -186,6 +188,8 @@ namespace { else if (post.has_xdata() && post.xdata().has_flags(POST_EXT_COMPOUND)) return post.xdata().compound_value; + else if (post.amount.is_null()) + return 0L; else return post.amount; } @@ -193,6 +197,8 @@ namespace { value_t get_total(post_t& post) { if (post.xdata_ && ! post.xdata_->total.is_null()) return post.xdata_->total; + else if (post.amount.is_null()) + return 0L; else return post.amount; } |