hledger/hledger-lib/Hledger/Data
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
..
Account.hs balance, register, register-csv: depth 0 shows summary items (#206) 2014-10-19 17:53:20 -07:00
AccountName.hs fix haddock failures (#281) 2015-08-26 10:11:32 -07:00
Amount.hs balance, etc: fix amount style loss (fixes #230, #276) 2015-09-02 16:21:56 -07:00
Commodity.hs strip trailing whitespace from all Haskell files 2014-10-14 18:48:24 -07:00
Dates.hs allow year parser to handle arbitrarily large years 2015-07-12 12:32:53 -07:00
Journal.hs rename historical prices to market prices 2015-08-09 16:20:02 -07:00
Ledger.hs refactor amount filtering helpers 2014-05-23 13:10:36 -07:00
Posting.hs fix simple aliases that match the whole account name 2015-05-28 10:40:48 -07:00
RawOptions.hs cli: with a repeated flag, the last takes precedence 2014-12-04 12:41:47 -08:00
StringFormat.hs fix haddock failures (#281) 2015-08-26 10:11:32 -07:00
TimeLog.hs handle pending status correctly, add --pending (#250) 2015-05-16 11:51:35 -07:00
Transaction.hs abstract parsec's SourcePos so as to derive NFData 2015-08-13 12:56:15 -07:00
Types.hs balance, lib: clarify --format implementation 2015-08-19 20:53:49 -07:00