hledger/hledger-lib/Hledger/Read
Stephen Morgan 2ada289e28 lib: Include sign in TotalPrice in Amount, rather than relying on the sign of
aquantity.

Journal entries still require a positive @@ price, but now the sign is
set after parsing, rather than when converting in amountToCost.

The reason for this change is that, if we're going to perform arithmetic
on Amount with TotalCost, then the presence of aquantity=0 means that
amountToCost would render the total cost as 0, because signum 0 == 0.
This makes journal entries like the following impossible to balance:
2000-01-01
    a  0 @@ 10 A
    b  -10 A
2021-02-23 14:54:39 -08:00
..
Common.hs lib: Include sign in TotalPrice in Amount, rather than relying on the sign of 2021-02-23 14:54:39 -08:00
CsvReader.hs lib: Make sure to add a newline to the end of aregister report. 2021-01-10 20:50:46 -08:00
JournalReader.hs lib,cli,ui: Replace some uses of String with Text, get rid of some unpacks, clean up showMixed options. 2021-01-02 15:08:09 +11:00
LedgerReader.hs.disabled debug: move command parsing debug output down to level 8 2020-07-03 11:37:01 -07:00
TimeclockReader.hs lib: Change skipMany spacenonewline to takeWhileP Nothing isNonNewlineSpace. 2020-07-22 14:58:53 -07:00
TimedotReader.hs lib: refactor: more consistent amount precision helpers 2021-02-05 16:09:49 -08:00