From c40db2b1eb1716ca4618fe5965e38e6903064d78 Mon Sep 17 00:00:00 2001 From: Stephen Morgan Date: Sat, 2 Jan 2021 08:54:10 +1100 Subject: [PATCH] lib: Make sure AtEnd valuation behaviour is consistent between single- and multi-period reports (#1424). --- hledger-lib/Hledger/Reports/MultiBalanceReport.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs index 9f42f2b1a..be9f4345a 100644 --- a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs +++ b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs @@ -564,10 +564,9 @@ subtractAcct a@Account{aibalance=i1,aebalance=e1} Account{aibalance=i2,aebalance -- different report periods. changingValuation :: ReportOpts -> Bool changingValuation ropts = case value_ ropts of - Just (AtCost (Just _)) -> multiperiod - Just (AtEnd _) -> multiperiod + Just (AtCost (Just _)) -> True + Just (AtEnd _) -> True _ -> False - where multiperiod = interval_ ropts /= NoInterval -- | Extract period changes from a cumulative list periodChanges :: Account -> Map k Account -> Map k Account