bs/is: fix "Ratio has zero denominator" error with no matched accounts (#518)
This commit is contained in:
parent
2de0109953
commit
c8e4bc0098
@ -137,8 +137,7 @@ balanceviewReport BalanceView{..} CliOpts{command_=cmd, reportopts_=ropts, rawop
|
|||||||
sumAmts = case amts of
|
sumAmts = case amts of
|
||||||
a1:as -> foldl' (zipWith (+)) a1 as
|
a1:as -> foldl' (zipWith (+)) a1 as
|
||||||
[] -> []
|
[] -> []
|
||||||
totavg = totsum `divideMixedAmount`
|
totavg = totsum `divideMixedAmount` fromIntegral (length sumAmts)
|
||||||
fromIntegral (length sumAmts)
|
|
||||||
mergedTabl = case tabls of
|
mergedTabl = case tabls of
|
||||||
t1:ts -> foldl' merging t1 ts
|
t1:ts -> foldl' merging t1 ts
|
||||||
[] -> T.empty
|
[] -> T.empty
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user