ui: fix wrong register start balance in historical mode

90c0d40 a few weeks ago miscalculated the starting balance
in accountTransactionsReport. Possibly also affects
-web and -api.
This commit is contained in:
Simon Michael 2016-09-05 14:44:16 -07:00
parent 9396bc6711
commit b262be7838

View File

@ -161,8 +161,11 @@ accountTransactionsReport opts j reportq thisacctq = (label, items)
(-- ltrace "priormatcher" $
And [thisacctq, realq, statusq, tostartdatequery]))
$ transactionsPostings ts
tostartdatequery = Date (DateSpan Nothing startdate)
startdate = queryStartDate (date2_ opts) q
tostartdatequery =
case mstartdate of
Just _ -> Date (DateSpan Nothing mstartdate)
Nothing -> None -- no start date specified, don't add up any prior postings
mstartdate = queryStartDate (date2_ opts) q
items = reverse $ -- see also registerChartHtml
accountTransactionsReportItems q thisacctq startbal negate ts