From 0f70cca098542d49ef7a6180c576cd8be19f7994 Mon Sep 17 00:00:00 2001 From: Ismaƫl Bouya Date: Mon, 30 Oct 2017 05:45:25 +0100 Subject: Strip annotation before adding exchange value --- src/pool.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pool.cc') diff --git a/src/pool.cc b/src/pool.cc index 931a1708..e5f5ad36 100644 --- a/src/pool.cc +++ b/src/pool.cc @@ -262,6 +262,9 @@ commodity_pool_t::exchange(const amount_t& amount, if (! cost.has_commodity()) per_unit_cost.clear_commodity(); + if (cost.has_annotation()) + per_unit_cost = per_unit_cost.strip_annotations(keep_details_t()); + DEBUG("commodity.prices.add", "exchange: per-unit-cost = " << per_unit_cost); // Do not record commodity exchanges where amount's commodity has a -- cgit v1.2.3