Never output calculate commodity valuation expressions
This commit is contained in:
parent
e3248ee5a6
commit
3fb7490bc9
2 changed files with 3 additions and 6 deletions
|
|
@ -212,8 +212,7 @@ void annotation_t::print(std::ostream& out, bool keep_base,
|
||||||
(! no_computed_annotations || ! has_flags(ANNOTATION_TAG_CALCULATED)))
|
(! no_computed_annotations || ! has_flags(ANNOTATION_TAG_CALCULATED)))
|
||||||
out << " (" << *tag << ')';
|
out << " (" << *tag << ')';
|
||||||
|
|
||||||
if (value_expr && (! no_computed_annotations ||
|
if (value_expr && ! has_flags(ANNOTATION_VALUE_EXPR_CALCULATED))
|
||||||
! has_flags(ANNOTATION_VALUE_EXPR_CALCULATED)))
|
|
||||||
out << " ((" << *value_expr << "))";
|
out << " ((" << *value_expr << "))";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -327,10 +326,7 @@ annotated_commodity_t::strip_annotations(const keep_details_t& what_to_keep)
|
||||||
|
|
||||||
if ((keep_price && details.price) ||
|
if ((keep_price && details.price) ||
|
||||||
(keep_date && details.date) ||
|
(keep_date && details.date) ||
|
||||||
(keep_tag && details.tag) ||
|
(keep_tag && details.tag)) {
|
||||||
(details.value_expr &&
|
|
||||||
! details.has_flags(ANNOTATION_VALUE_EXPR_CALCULATED)))
|
|
||||||
{
|
|
||||||
new_comm = pool().find_or_create
|
new_comm = pool().find_or_create
|
||||||
(referent(), annotation_t(keep_price ? details.price : none,
|
(referent(), annotation_t(keep_price ? details.price : none,
|
||||||
keep_date ? details.date : none,
|
keep_date ? details.date : none,
|
||||||
|
|
|
||||||
|
|
@ -688,6 +688,7 @@ void extend_post(post_t& post, journal_t& journal)
|
||||||
if (! details) {
|
if (! details) {
|
||||||
annotation_t new_details;
|
annotation_t new_details;
|
||||||
new_details.value_expr = value_expr;
|
new_details.value_expr = value_expr;
|
||||||
|
|
||||||
commodity_t * new_comm =
|
commodity_t * new_comm =
|
||||||
commodity_pool_t::current_pool->find_or_create(comm, new_details);
|
commodity_pool_t::current_pool->find_or_create(comm, new_details);
|
||||||
post.amount.set_commodity(*new_comm);
|
post.amount.set_commodity(*new_comm);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue