bs/is: fix "Ratio has zero denominator" error (take 2) (#535)
This commit is contained in:
parent
c8e4bc0098
commit
118bc85726
@ -531,8 +531,8 @@ balanceReportAsTable opts (MultiBalanceReport (colspans, items, (coltotals,tot,a
|
|||||||
addtotalrow | no_total_ opts = id
|
addtotalrow | no_total_ opts = id
|
||||||
| otherwise = (+----+ (row "" $
|
| otherwise = (+----+ (row "" $
|
||||||
coltotals
|
coltotals
|
||||||
++ (if row_total_ opts then [tot] else [])
|
++ (if row_total_ opts && not (null coltotals) then [tot] else [])
|
||||||
++ (if average_ opts then [avg] else [])
|
++ (if average_ opts && not (null coltotals) then [avg] else [])
|
||||||
))
|
))
|
||||||
|
|
||||||
-- | Figure out the overall date span of a multicolumn balance report.
|
-- | Figure out the overall date span of a multicolumn balance report.
|
||||||
|
|||||||
@ -148,8 +148,8 @@ balanceviewReport BalanceView{..} CliOpts{command_=cmd, reportopts_=ropts, rawop
|
|||||||
mergedTabl
|
mergedTabl
|
||||||
+====+
|
+====+
|
||||||
row "Total"
|
row "Total"
|
||||||
(sumAmts ++ (if row_total_ ropts' then [totsum] else [])
|
(sumAmts ++ (if row_total_ ropts' && not (null sumAmts) then [totsum] else [])
|
||||||
++ (if average_ ropts' then [totavg] else [])
|
++ (if average_ ropts' && not (null sumAmts) then [totavg] else [])
|
||||||
)
|
)
|
||||||
putStrLn title
|
putStrLn title
|
||||||
putStrLn $ renderBalanceReportTable ropts totTabl
|
putStrLn $ renderBalanceReportTable ropts totTabl
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user