diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-09 06:45:07 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-09 06:45:07 -0400 |
commit | 8637dd6ccf7afc71d911cd66c4a55a1308596dbb (patch) | |
tree | 64a6f4bdadfb59fe25eec507b6b9024653087ee0 /src/amount.cc | |
parent | da2f415f148b69898d71405235eaa8b36aa21b3b (diff) | |
download | fork-ledger-8637dd6ccf7afc71d911cd66c4a55a1308596dbb.tar.gz fork-ledger-8637dd6ccf7afc71d911cd66c4a55a1308596dbb.tar.bz2 fork-ledger-8637dd6ccf7afc71d911cd66c4a55a1308596dbb.zip |
New display flag AMOUNT_PRINT_ELIDE_COMMODITY_QUOTES
This is used by reports like register and balance so that separated
commodities without spaces in them needed be surrounded by quotes. It
will still occur in most other places.
Fixes #200 / F82CF11F-BFD9-4512-A562-202B04B68051
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amount.cc b/src/amount.cc index 105b54ef..01caf4ac 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -1233,7 +1233,7 @@ void amount_t::print(std::ostream& _out, const uint_least8_t flags) const commodity_t& comm(commodity()); if (! comm.has_flags(COMMODITY_STYLE_SUFFIXED)) { - comm.print(out); + comm.print(out, flags & AMOUNT_PRINT_ELIDE_COMMODITY_QUOTES); if (comm.has_flags(COMMODITY_STYLE_SEPARATED)) out << " "; } @@ -1244,7 +1244,7 @@ void amount_t::print(std::ostream& _out, const uint_least8_t flags) const if (comm.has_flags(COMMODITY_STYLE_SUFFIXED)) { if (comm.has_flags(COMMODITY_STYLE_SEPARATED)) out << " "; - comm.print(out); + comm.print(out, flags & AMOUNT_PRINT_ELIDE_COMMODITY_QUOTES); } // If there are any annotations associated with this commodity, output them |