hledger
hledger copied to clipboard
hledger-check-fancyassertions does not run assertions in date order
trafficstars
Assume a file where transactions are not in chronological order, e.g.
; main.journal
2021-10-21 Spendings
Assets -1
Expenses
2021-01-01 Init
Assets 10
Equity
Running hledger-check-fancyassertions -D "Assets >= 0" -f main.journal will fail with
assertion 'Assets >= 0' violated
after transaction:
2021-10-21 Spendings
Assets -1
Expenses 1
(after posting: 2021-10-21 Expenses )
relevant balances:
Assets Mixed (fromList [(MixedAmountKeyNoPrice "",Amount {acommodity = "", aquantity = -1, astyle = AmountStylePP "LFalsePrecision 0Just '.'Nothing..", aprice = Nothing})])