summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-02-18 07:11:59 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:05 -0400
commit0f98c9235f5106d18b33d026b99edbcfdcd66478 (patch)
tree78b66f2b6a276ee048184ba6c1fdd4ac96842d82
parent816e15dcf8768d184b81c7e947341ad64c30b2c5 (diff)
downloadfork-ledger-0f98c9235f5106d18b33d026b99edbcfdcd66478.tar.gz
fork-ledger-0f98c9235f5106d18b33d026b99edbcfdcd66478.tar.bz2
fork-ledger-0f98c9235f5106d18b33d026b99edbcfdcd66478.zip
*** empty log message ***
-rw-r--r--NEWS8
-rw-r--r--amount.cc8
2 files changed, 8 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 00074f6a..3a1d4f77 100644
--- a/NEWS
+++ b/NEWS
@@ -14,10 +14,10 @@ New features:
- The "D <COMM>" command, released in 2.1, now requires a regular,
commoditized amount, such as "D $1,000.00". This sets not only the
- default commodity, but also the default flags and precision to be
- used with that commodity. It may also be used be many times; which
- was most recently seen will be the default for the entries that
- follow.
+ default commodity, but also several default flags to be used with
+ all commodities (such as whether all numbering should be American or
+ European). It may also be used be many times; which was most
+ recently seen will be the default for the entries that follow.
- Fixed several bugs with Ledger's XML data format.
diff --git a/amount.cc b/amount.cc
index 61b8606d..35f50b21 100644
--- a/amount.cc
+++ b/amount.cc
@@ -1158,10 +1158,10 @@ commodity_t * commodity_t::find_commodity(const std::string& symbol,
// Start out the new commodity with the default commodity's flags
// and precision, if one has been defined.
- if (default_commodity) {
- commodity->flags = default_commodity->flags;
- commodity->precision = default_commodity->precision;
- }
+ if (default_commodity)
+ commodity->flags =
+ (default_commodity->flags & ~COMMODITY_STYLE_THOUSANDS);
+
return commodity;
}