hledger/hledger-lib/Hledger
Stephen Morgan cf25d7d56d
imp: bal: more predictable sort order with multiple commodities (#1563, #1564)
This change provides more predictable and intuitive behaviour when 
using -S/--sort-amount with multiple commodities. 
It implements a custom Ord (and Eq) instance for MixedAmount 
which substitutes zero for any missing commodities.

As a consequence, all the ways of representing zero with a MixedAmount ([],
[A 0], [A 0, B 0, ...]) are now Eq-ual (==), whereas before they were
not. We have not been able to find anything broken by this change.

* imp: lib: Compare MixedAmounts by substituting zero for any missing commodities. (#1563)
* ;doc: Update docs for new multicommodity sort by amount rules.
2021-07-12 21:11:50 -10:00
..
Data imp: bal: more predictable sort order with multiple commodities (#1563, #1564) 2021-07-12 21:11:50 -10:00
Read ;check, payees, journal: payee directive no longer consumes trailing whitespace (#1580) 2021-06-23 14:13:24 -10:00
Reports fix: ui: transaction: possibly off-by-one valuation date 2021-07-12 18:50:06 -10:00
Utils ui: Do not log to debug.log when regenerating journal in Transaction 2021-06-30 16:07:32 -10:00
Data.hs lib: Change internal representation of MixedAmount to use a strict Map 2021-05-01 09:45:29 -10:00
Query.hs lib,cli,ui,web: Remove unnecessary CPP when dropping support for GHC 8.2. 2021-06-07 17:33:54 -10:00
Read.hs lib,cli,ui,web: Remove unnecessary CPP when dropping support for GHC 8.2. 2021-06-07 17:33:54 -10:00
Reports.hs lib,cli,ui,web: Remove unused LANGUAGE pragmas. 2021-06-07 17:33:54 -10:00
Utils.hs lib,cli,ui,bin: Create a new API for MixedAmount arithmetic. This should 2021-03-18 09:47:21 +11:00