(parse_conversion): When defining a commodity conversion, always mark

the larger unit as having no market value (the market price is
determined by looking up the base commodity and then multiplying).
This commit is contained in:
John Wiegley 2005-03-08 04:54:38 +00:00
parent 6083fe5777
commit 1823a2b886

View file

@ -984,7 +984,8 @@ void parse_conversion(const std::string& larger_str,
if (larger.commodity()) {
larger.commodity().smaller = new amount_t(smaller);
larger.commodity().flags = smaller.commodity().flags;
larger.commodity().flags = (smaller.commodity().flags |
COMMODITY_STYLE_NOMARKET);
}
if (smaller.commodity())
smaller.commodity().larger = new amount_t(larger);