diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-27 02:39:54 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-27 02:39:54 -0400 |
commit | 6d315840a8e98ab7dbe28a76f23c734d09c33bc5 (patch) | |
tree | 9738036fafa4a5161f666179e5d0cecc8b29328b /src/amount.cc | |
parent | 4389edb63921d5bad4335ea6307f48c8305ba1fd (diff) | |
download | fork-ledger-6d315840a8e98ab7dbe28a76f23c734d09c33bc5.tar.gz fork-ledger-6d315840a8e98ab7dbe28a76f23c734d09c33bc5.tar.bz2 fork-ledger-6d315840a8e98ab7dbe28a76f23c734d09c33bc5.zip |
Don't propagate display flags from cost amounts
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amount.cc b/src/amount.cc index d7cdbacb..82d9b41b 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -933,15 +933,15 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) // Set the commodity's flags and precision accordingly - if (commodity_ && (newly_created || ! flags.has_flags(PARSE_NO_MIGRATE))) { + if (flags.has_flags(PARSE_NO_MIGRATE)) { + set_keep_precision(true); + } + else if (commodity_) { commodity().add_flags(comm_flags); if (quantity->prec > commodity().precision()) commodity().set_precision(quantity->prec); } - else if (flags.has_flags(PARSE_NO_MIGRATE)) { - set_keep_precision(true); - } // Now we have the final number. Remove commas and periods, if // necessary. |