lib: Make sure AtEnd valuation behaviour is consistent between single- and multi-period reports (#1424).
This commit is contained in:
parent
83110e8820
commit
c40db2b1eb
@ -564,10 +564,9 @@ subtractAcct a@Account{aibalance=i1,aebalance=e1} Account{aibalance=i2,aebalance
|
|||||||
-- different report periods.
|
-- different report periods.
|
||||||
changingValuation :: ReportOpts -> Bool
|
changingValuation :: ReportOpts -> Bool
|
||||||
changingValuation ropts = case value_ ropts of
|
changingValuation ropts = case value_ ropts of
|
||||||
Just (AtCost (Just _)) -> multiperiod
|
Just (AtCost (Just _)) -> True
|
||||||
Just (AtEnd _) -> multiperiod
|
Just (AtEnd _) -> True
|
||||||
_ -> False
|
_ -> False
|
||||||
where multiperiod = interval_ ropts /= NoInterval
|
|
||||||
|
|
||||||
-- | Extract period changes from a cumulative list
|
-- | Extract period changes from a cumulative list
|
||||||
periodChanges :: Account -> Map k Account -> Map k Account
|
periodChanges :: Account -> Map k Account -> Map k Account
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user