refactor
This commit is contained in:
parent
09ab5e1cb2
commit
b3d38be797
@ -33,7 +33,7 @@ showRegisterReport opts args l
|
|||||||
| otherwise = showtxns summaryts nulltxn startbal
|
| otherwise = showtxns summaryts nulltxn startbal
|
||||||
where
|
where
|
||||||
interval = intervalFromOpts opts
|
interval = intervalFromOpts opts
|
||||||
ts = sortBy (comparing tdate) $ filterempties $ filter matchapats $ filterdepth $ ledgerTransactions l
|
ts = sortBy (comparing tdate) $ filterempties $ filtertxns apats $ filterdepth $ ledgerTransactions l
|
||||||
filterdepth | interval == NoInterval = filter (\t -> accountNameLevel (taccount t) <= depth)
|
filterdepth | interval == NoInterval = filter (\t -> accountNameLevel (taccount t) <= depth)
|
||||||
| otherwise = id
|
| otherwise = id
|
||||||
filterempties
|
filterempties
|
||||||
@ -42,7 +42,6 @@ showRegisterReport opts args l
|
|||||||
(precedingts, ts') = break (matchdisplayopt dopt) ts
|
(precedingts, ts') = break (matchdisplayopt dopt) ts
|
||||||
(displayedts, _) = span (matchdisplayopt dopt) ts'
|
(displayedts, _) = span (matchdisplayopt dopt) ts'
|
||||||
startbal = sumTransactions precedingts
|
startbal = sumTransactions precedingts
|
||||||
matchapats = matchpats apats . taccount
|
|
||||||
(apats,_) = parsePatternArgs args
|
(apats,_) = parsePatternArgs args
|
||||||
matchdisplayopt Nothing _ = True
|
matchdisplayopt Nothing _ = True
|
||||||
matchdisplayopt (Just e) t = (fromparse $ parsewith datedisplayexpr e) t
|
matchdisplayopt (Just e) t = (fromparse $ parsewith datedisplayexpr e) t
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user