summaryrefslogtreecommitdiff
path: root/src/annotate.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-20 05:03:18 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-20 05:03:18 -0500
commit3fb7490bc91e65050e090ab7fa2dcae230d1697e (patch)
tree189ff9c8ac686d49774ab9ff5feb3f8f5aefff69 /src/annotate.cc
parente3248ee5a6b2c29e1c35eb0315fd66370a117784 (diff)
downloadfork-ledger-3fb7490bc91e65050e090ab7fa2dcae230d1697e.tar.gz
fork-ledger-3fb7490bc91e65050e090ab7fa2dcae230d1697e.tar.bz2
fork-ledger-3fb7490bc91e65050e090ab7fa2dcae230d1697e.zip
Never output calculate commodity valuation expressions
Diffstat (limited to 'src/annotate.cc')
-rw-r--r--src/annotate.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/annotate.cc b/src/annotate.cc
index 98635ad7..c9fd6d3f 100644
--- a/src/annotate.cc
+++ b/src/annotate.cc
@@ -212,8 +212,7 @@ void annotation_t::print(std::ostream& out, bool keep_base,
(! no_computed_annotations || ! has_flags(ANNOTATION_TAG_CALCULATED)))
out << " (" << *tag << ')';
- if (value_expr && (! no_computed_annotations ||
- ! has_flags(ANNOTATION_VALUE_EXPR_CALCULATED)))
+ if (value_expr && ! has_flags(ANNOTATION_VALUE_EXPR_CALCULATED))
out << " ((" << *value_expr << "))";
}
@@ -327,10 +326,7 @@ 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.has_flags(ANNOTATION_VALUE_EXPR_CALCULATED)))
- {
+ (keep_tag && details.tag)) {
new_comm = pool().find_or_create
(referent(), annotation_t(keep_price ? details.price : none,
keep_date ? details.date : none,