hledger/hledger-lib/Hledger
Simon Michael b8d75b7728 balance, etc: fix amount style loss (fixes #230, #276)
hledger-lib-0.24's "track the commodity of zero amounts when
possible (useful eg for hledger-web's multi-commodity charts)" preserved
the commodity when normalising a zero mixed amount, but not the amount
style. This showed up as occasionally incorrect amount style (commodity
symbol placement, decimal point character, etc.) in balance reports with
certain journals, like this:

  $ hledger bal
              €3000.00  a     <------ not using the canonical € style
              4000,58€    1
             -1000,58€    D
             -3000,00€  e
  --------------------
                     0

I thought this would require a big rewrite of amount arithmetic, but it
seems that just being a little more careful is enough. When normalising
a mixed amount containing multiple zeros in the same commodity, we now
preserve the last zero with its amount style, instead of replacing them
all with a new one.
2015-09-02 16:21:56 -07:00
..
Data balance, etc: fix amount style loss (fixes #230, #276) 2015-09-02 16:21:56 -07:00
Read Merge branch 'perf-polyparse' (early part) 2015-08-13 13:10:10 -07:00
Reports web: fix options breakage, add test code to tags 2015-08-28 15:23:49 -07:00
Utils cli/ui/web: rename X.Options modules to X.XOptions 2015-08-28 12:43:51 -07:00
Data.hs balance, lib: --format/StringFormat improvements 2015-08-19 20:53:51 -07:00
Query.hs validate --depth/depth:'s argument is positive 2015-08-28 09:57:30 -07:00
Read.hs begin reviving journalreader unit tests 2015-06-11 10:16:46 -07:00
Reports.hs split up Hledger.Reports 2014-03-19 17:31:18 -07:00
Utils.hs lib: 6-tuple accessors 2015-08-24 16:24:11 -07:00