cli: Commands.Aregister: support option --cumulative
This commit is contained in:
parent
95ef5fad9a
commit
b2aad52168
@ -48,11 +48,11 @@ aregistermode = hledgerCommandMode
|
|||||||
([
|
([
|
||||||
flagNone ["txn-dates"] (setboolopt "txn-dates")
|
flagNone ["txn-dates"] (setboolopt "txn-dates")
|
||||||
"filter strictly by transaction date, not posting date. Warning: this can show a wrong running balance."
|
"filter strictly by transaction date, not posting date. Warning: this can show a wrong running balance."
|
||||||
,flagNone ["no-elide"] (setboolopt "no-elide") "don't show only 2 commodities per amount"
|
,flagNone ["no-elide"] (setboolopt "no-elide") "don't show only 2 commodities per amount"
|
||||||
-- flagNone ["cumulative"] (setboolopt "cumulative")
|
,flagNone ["cumulative"] (setboolopt "cumulative")
|
||||||
-- "show running total from report start date (default)"
|
"show running total from report start date"
|
||||||
-- ,flagNone ["historical","H"] (setboolopt "historical")
|
,flagNone ["historical","H"] (setboolopt "historical")
|
||||||
-- "show historical running total/balance (includes postings before report start date)\n "
|
"show historical running total/balance (includes postings before report start date) (default)\n "
|
||||||
-- ,flagNone ["average","A"] (setboolopt "average")
|
-- ,flagNone ["average","A"] (setboolopt "average")
|
||||||
-- "show running average of posting amounts instead of total (implies --empty)"
|
-- "show running average of posting amounts instead of total (implies --empty)"
|
||||||
-- ,flagNone ["related","r"] (setboolopt "related") "show postings' siblings instead"
|
-- ,flagNone ["related","r"] (setboolopt "related") "show postings' siblings instead"
|
||||||
@ -97,8 +97,10 @@ aregister opts@CliOpts{rawopts_=rawopts,reportspec_=rspec} j = do
|
|||||||
ropts' = (_rsReportOpts rspec) {
|
ropts' = (_rsReportOpts rspec) {
|
||||||
-- ignore any depth limit, as in postingsReport; allows register's total to match balance reports (cf #1468)
|
-- ignore any depth limit, as in postingsReport; allows register's total to match balance reports (cf #1468)
|
||||||
depth_=Nothing
|
depth_=Nothing
|
||||||
-- always show historical balance
|
, balanceaccum_ =
|
||||||
, balanceaccum_= Historical
|
case balanceaccum_ $ _rsReportOpts rspec of
|
||||||
|
PerPeriod -> Historical
|
||||||
|
ba -> ba
|
||||||
, querystring_ = querystr
|
, querystring_ = querystr
|
||||||
}
|
}
|
||||||
wd = whichDate ropts'
|
wd = whichDate ropts'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user