summaryrefslogtreecommitdiff
path: root/src/annotate.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-20 04:56:03 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-20 04:56:03 -0500
commite3248ee5a6b2c29e1c35eb0315fd66370a117784 (patch)
treeb394d8045e8e524d3dc7c6c6efd9fe865756e994 /src/annotate.cc
parent446beee376ecfd5371335ac99cd287fc26851006 (diff)
downloadfork-ledger-e3248ee5a6b2c29e1c35eb0315fd66370a117784.tar.gz
fork-ledger-e3248ee5a6b2c29e1c35eb0315fd66370a117784.tar.bz2
fork-ledger-e3248ee5a6b2c29e1c35eb0315fd66370a117784.zip
Fix problems with <Adjustment> postings
Diffstat (limited to 'src/annotate.cc')
-rw-r--r--src/annotate.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/annotate.cc b/src/annotate.cc
index 25f0e582..98635ad7 100644
--- a/src/annotate.cc
+++ b/src/annotate.cc
@@ -328,7 +328,8 @@ annotated_commodity_t::strip_annotations(const keep_details_t& what_to_keep)
if ((keep_price && details.price) ||
(keep_date && details.date) ||
(keep_tag && details.tag) ||
- details.value_expr)
+ (details.value_expr &&
+ ! details.has_flags(ANNOTATION_VALUE_EXPR_CALCULATED)))
{
new_comm = pool().find_or_create
(referent(), annotation_t(keep_price ? details.price : none,