summaryrefslogtreecommitdiff
path: root/src/commodity.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-20 18:54:21 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-20 20:29:53 -0400
commit82e43fe125a9b2158976fe5a3afccfa85d7a7574 (patch)
tree48d6b91a60e2a0d1f8f1f9ceb644c51568e35bb7 /src/commodity.h
parent6420390d36ee2f5fe074c48eb030b32fe63d6af5 (diff)
downloadfork-ledger-82e43fe125a9b2158976fe5a3afccfa85d7a7574.tar.gz
fork-ledger-82e43fe125a9b2158976fe5a3afccfa85d7a7574.tar.bz2
fork-ledger-82e43fe125a9b2158976fe5a3afccfa85d7a7574.zip
If fixated price commodities are mixed, show them
For example, if a Ledger file contains transactions with the use of both EUR and EUR {=PRICE}, then regular reports will always show the {=PRICE}, disabling the by-name commodity merging that takes place. In brief, fixated and non-fixated commodities are now non-mergable. If a file contains all of one, or all of the other, they will still be merged, since these separate usages do not conflict the way that fixated and non-fixated together do.
Diffstat (limited to 'src/commodity.h')
-rw-r--r--src/commodity.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/commodity.h b/src/commodity.h
index 24cd5a08..fcd26da0 100644
--- a/src/commodity.h
+++ b/src/commodity.h
@@ -164,16 +164,19 @@ protected:
class base_t : public noncopyable, public supports_flags<uint_least16_t>
{
public:
-#define COMMODITY_STYLE_DEFAULTS 0x000
-#define COMMODITY_STYLE_SUFFIXED 0x001
-#define COMMODITY_STYLE_SEPARATED 0x002
-#define COMMODITY_STYLE_DECIMAL_COMMA 0x004
-#define COMMODITY_STYLE_THOUSANDS 0x008
-#define COMMODITY_NOMARKET 0x010
-#define COMMODITY_BUILTIN 0x020
-#define COMMODITY_WALKED 0x040
-#define COMMODITY_KNOWN 0x080
-#define COMMODITY_PRIMARY 0x100
+#define COMMODITY_STYLE_DEFAULTS 0x000
+#define COMMODITY_STYLE_SUFFIXED 0x001
+#define COMMODITY_STYLE_SEPARATED 0x002
+#define COMMODITY_STYLE_DECIMAL_COMMA 0x004
+#define COMMODITY_STYLE_THOUSANDS 0x008
+#define COMMODITY_NOMARKET 0x010
+#define COMMODITY_BUILTIN 0x020
+#define COMMODITY_WALKED 0x040
+#define COMMODITY_KNOWN 0x080
+#define COMMODITY_PRIMARY 0x100
+#define COMMODITY_SAW_ANNOTATED 0x200
+#define COMMODITY_SAW_ANN_PRICE_FLOAT 0x400
+#define COMMODITY_SAW_ANN_PRICE_FIXATED 0x800
string symbol;
amount_t::precision_t precision;