From 82e43fe125a9b2158976fe5a3afccfa85d7a7574 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 20 Jun 2010 18:54:21 -0400 Subject: 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. --- src/commodity.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/commodity.h') 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 { 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; -- cgit v1.2.3