parsing: order postings first by date, then by parse order when checking balance assertions
This commit is contained in:
parent
5685b3dc9c
commit
6073b56b9e
@ -377,7 +377,10 @@ checkBalanceAssertionsForAccount ps
|
|||||||
| null errs = Right ()
|
| null errs = Right ()
|
||||||
| otherwise = Left $ head errs
|
| otherwise = Left $ head errs
|
||||||
where
|
where
|
||||||
errs = fst $ foldl' checkBalanceAssertion ([],nullmixedamt) $ splitAssertions ps
|
errs = fst $
|
||||||
|
foldl' checkBalanceAssertion ([],nullmixedamt) $
|
||||||
|
splitAssertions $
|
||||||
|
sortBy (comparing postingDate) ps
|
||||||
|
|
||||||
-- Given a starting balance, accumulated errors, and a non-null sequence of
|
-- Given a starting balance, accumulated errors, and a non-null sequence of
|
||||||
-- postings to a single account with a balance assertion in the last:
|
-- postings to a single account with a balance assertion in the last:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user