diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/amount.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amount.cc b/src/amount.cc index bcd4bb8c..d9b7c82c 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -737,7 +737,9 @@ amount_t::value(const bool primary_only, #endif if (has_commodity() && (! primary_only || ! commodity().has_flags(COMMODITY_PRIMARY))) { - if (in_terms_of && commodity() == *in_terms_of) { + if (in_terms_of && + (commodity() == *in_terms_of || + commodity().referent() == in_terms_of->referent())) { return *this; } else if (has_annotation() && annotation().price && |