summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-03-08 04:54:38 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:06 -0400
commit1823a2b886485e34dd46e08c636c95e2d1063e77 (patch)
tree43fd13e070911615422b8d3d74a4f8b1f793f5d5
parent6083fe577750a7af204f627a893dfd8286aa375d (diff)
downloadfork-ledger-1823a2b886485e34dd46e08c636c95e2d1063e77.tar.gz
fork-ledger-1823a2b886485e34dd46e08c636c95e2d1063e77.tar.bz2
fork-ledger-1823a2b886485e34dd46e08c636c95e2d1063e77.zip
(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).
-rw-r--r--amount.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/amount.cc b/amount.cc
index 05421760..d1ce01ec 100644
--- a/amount.cc
+++ b/amount.cc
@@ -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);