mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-30 22:02:20 +03:00
balance, register: fix --date2 with report intervals
This commit is contained in:
parent
06ad1b0a5d
commit
c9d60fab73
@ -401,6 +401,7 @@ queryIsDepth _ = False
|
||||
|
||||
queryIsDate :: Query -> Bool
|
||||
queryIsDate (Date _) = True
|
||||
queryIsDate (Date2 _) = True
|
||||
queryIsDate _ = False
|
||||
|
||||
queryIsDesc :: Query -> Bool
|
||||
|
@ -78,7 +78,8 @@ multiBalanceReport opts q j = MultiBalanceReport (displayspans, items, totals)
|
||||
intervalspans = dbg "intervalspans" $ splitSpan (intervalFromOpts opts) requestedspan' -- interval spans enclosing it
|
||||
reportspan = dbg "reportspan" $ DateSpan (maybe Nothing spanStart $ headMay intervalspans) -- the requested span enlarged to a whole number of intervals
|
||||
(maybe Nothing spanEnd $ lastMay intervalspans)
|
||||
reportq = dbg "reportq" $ depthless $ And [datelessq, Date reportspan] -- user's query enlarged to whole intervals and with no depth limit
|
||||
newdatesq = dbg "newdateq" $ (if date2_ opts then Date2 else Date) reportspan
|
||||
reportq = dbg "reportq" $ depthless $ And [datelessq, newdatesq] -- user's query enlarged to whole intervals and with no depth limit
|
||||
|
||||
ps :: [Posting] =
|
||||
dbg "ps" $
|
||||
|
@ -60,7 +60,8 @@ postingsReport opts q j = (totallabel, items)
|
||||
intervalspans = dbg "intervalspans" $ splitSpan (intervalFromOpts opts) requestedspan' -- interval spans enclosing it
|
||||
reportspan = dbg "reportspan" $ DateSpan (maybe Nothing spanStart $ headMay intervalspans) -- the requested span enlarged to a whole number of intervals
|
||||
(maybe Nothing spanEnd $ lastMay intervalspans)
|
||||
reportq = dbg "reportq" $ depthless $ And [dateless q, Date reportspan] -- user's query enlarged to whole intervals and with no depth limit
|
||||
newdatesq = dbg "newdateq" $ (if date2_ opts then Date2 else Date) reportspan
|
||||
reportq = dbg "reportq" $ depthless $ And [dateless q, newdatesq] -- user's query enlarged to whole intervals and with no depth limit
|
||||
|
||||
(precedingps, displayableps, _) =
|
||||
dbg "ps5" $ postingsMatchingDisplayExpr displayexpr opts $ -- filter and group by the -d display expression
|
||||
|
Loading…
Reference in New Issue
Block a user