--no-total hides balance report's final total
This commit is contained in:
parent
83b0ebf832
commit
80a0653b3e
@ -129,7 +129,8 @@ showBalanceReport opts args l = acctsstr ++ totalstr
|
|||||||
interestingaccts = filter (isInteresting opts l) acctnames
|
interestingaccts = filter (isInteresting opts l) acctnames
|
||||||
acctnames = sort $ tail $ flatten $ treemap aname accttree
|
acctnames = sort $ tail $ flatten $ treemap aname accttree
|
||||||
accttree = ledgerAccountTree (depthFromOpts opts) l
|
accttree = ledgerAccountTree (depthFromOpts opts) l
|
||||||
totalstr | not (Empty `elem` opts) && isZeroMixedAmount total = ""
|
totalstr | NoTotal `elem` opts = ""
|
||||||
|
| not (Empty `elem` opts) && isZeroMixedAmount total = ""
|
||||||
| otherwise = printf "--------------------\n%s\n" $ padleft 20 $ showMixedAmount total
|
| otherwise = printf "--------------------\n%s\n" $ padleft 20 $ showMixedAmount total
|
||||||
where
|
where
|
||||||
total = sum $ map abalance $ topAccounts l
|
total = sum $ map abalance $ topAccounts l
|
||||||
|
|||||||
@ -70,6 +70,7 @@ options = [
|
|||||||
"(where EXPR is 'dOP[DATE]', OP is <, <=, =, >=, >)")
|
"(where EXPR is 'dOP[DATE]', OP is <, <=, =, >=, >)")
|
||||||
,Option ['E'] ["empty"] (NoArg Empty) "show empty/zero things which are normally elided"
|
,Option ['E'] ["empty"] (NoArg Empty) "show empty/zero things which are normally elided"
|
||||||
,Option ['R'] ["real"] (NoArg Real) "report only on real (non-virtual) transactions"
|
,Option ['R'] ["real"] (NoArg Real) "report only on real (non-virtual) transactions"
|
||||||
|
,Option [] ["no-total"] (NoArg NoTotal) "balance report: hide the final total"
|
||||||
-- ,Option ['s'] ["subtotal"] (NoArg SubTotal) "balance report: show subaccounts"
|
-- ,Option ['s'] ["subtotal"] (NoArg SubTotal) "balance report: show subaccounts"
|
||||||
,Option ['W'] ["weekly"] (NoArg WeeklyOpt) "register report: show weekly summary"
|
,Option ['W'] ["weekly"] (NoArg WeeklyOpt) "register report: show weekly summary"
|
||||||
,Option ['M'] ["monthly"] (NoArg MonthlyOpt) "register report: show monthly summary"
|
,Option ['M'] ["monthly"] (NoArg MonthlyOpt) "register report: show monthly summary"
|
||||||
@ -98,6 +99,7 @@ data Opt =
|
|||||||
Display {value::String} |
|
Display {value::String} |
|
||||||
Empty |
|
Empty |
|
||||||
Real |
|
Real |
|
||||||
|
NoTotal |
|
||||||
SubTotal |
|
SubTotal |
|
||||||
WeeklyOpt |
|
WeeklyOpt |
|
||||||
MonthlyOpt |
|
MonthlyOpt |
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user