diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-11 04:02:52 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-11 04:02:52 -0500 |
commit | fad24d40f7826b4c4ea840f0c068ac43ed50947d (patch) | |
tree | aab87543e05d038f37b82a2e6515156afc244fde /src/report.cc | |
parent | d93c5a7d437a7a85413658ba3672b715077f6eb6 (diff) | |
download | fork-ledger-fad24d40f7826b4c4ea840f0c068ac43ed50947d.tar.gz fork-ledger-fad24d40f7826b4c4ea840f0c068ac43ed50947d.tar.bz2 fork-ledger-fad24d40f7826b4c4ea840f0c068ac43ed50947d.zip |
When --percent is used, disable --decimal-comma after parsing
Fixes #674
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/report.cc b/src/report.cc index a3abcb98..3151b211 100644 --- a/src/report.cc +++ b/src/report.cc @@ -162,13 +162,16 @@ void report_t::normalize_options(const string& verb) terminus); } - if (HANDLED(percent) && HANDLED(market)) { - HANDLER(total_) - .on("?normalize", - "(__tmp = market(parent.total, value_date, exchange);" - " ((is_account & parent & __tmp) ?" - " percent(scrub(market(total, value_date, exchange)), " - " scrub(__tmp)) : 0))"); + if (HANDLED(percent)) { + commodity_t::decimal_comma_by_default = false; + if (HANDLED(market)) { + HANDLER(total_) + .on("?normalize", + "(__tmp = market(parent.total, value_date, exchange);" + " ((is_account & parent & __tmp) ?" + " percent(scrub(market(total, value_date, exchange)), " + " scrub(__tmp)) : 0))"); + } } if (HANDLED(immediate) && HANDLED(market)) { |