diff --git a/bin/hledger-check-fancyassertions.hs b/bin/hledger-check-fancyassertions.hs index 2f8ea1baa..9c88a261a 100755 --- a/bin/hledger-check-fancyassertions.hs +++ b/bin/hledger-check-fancyassertions.hs @@ -225,7 +225,7 @@ checkAssertion accounts = checkAssertion' -- information, and sort by commodity name. fixup m1 m2 = let m = H.mixed $ amounts m1 ++ [m_ { H.aquantity = 0 } | m_ <- amounts m2] - as = amounts $ H.normaliseMixedAmount m + as = amounts m in H.mixed $ sortOn H.acommodity . map (\a -> a { H.astyle = H.amountstyle }) $ as -- | Check if an account name is mentioned in an assertion. diff --git a/hledger-lib/Hledger/Data/Account.hs b/hledger-lib/Hledger/Data/Account.hs index c7d3257b2..5e4bdb47b 100644 --- a/hledger-lib/Hledger/Data/Account.hs +++ b/hledger-lib/Hledger/Data/Account.hs @@ -208,7 +208,7 @@ sortAccountTreeByAmount normalsign = mapAccounts $ \a -> a{asubs=sortSubs $ asub sortSubs = case normalsign of NormallyPositive -> sortOn (\a -> (Down $ amt a, aname a)) NormallyNegative -> sortOn (\a -> (amt a, aname a)) - amt = normaliseMixedAmountSquashPricesForDisplay . aibalance + amt = mixedAmountStripPrices . aibalance -- | Add extra info for this account derived from the Journal's -- account directives, if any (comment, tags, declaration order..). diff --git a/hledger-lib/Hledger/Data/Transaction.hs b/hledger-lib/Hledger/Data/Transaction.hs index 058b47f80..1f71004f6 100644 --- a/hledger-lib/Hledger/Data/Transaction.hs +++ b/hledger-lib/Hledger/Data/Transaction.hs @@ -501,7 +501,7 @@ inferBalancingAmount styles t@Transaction{tpostings=ps} -- Inferred amounts are converted to cost. -- Also ensure the new amount has the standard style for its commodity -- (since the main amount styling pass happened before this balancing pass); - a' = styleMixedAmount styles . normaliseMixedAmount . mixedAmountCost $ maNegate a + a' = styleMixedAmount styles . mixedAmountCost $ maNegate a -- | Infer prices for this transaction's posting amounts, if needed to make -- the postings balance, and if possible. This is done once for the real diff --git a/hledger-lib/Hledger/Reports/BudgetReport.hs b/hledger-lib/Hledger/Reports/BudgetReport.hs index d1396678b..4f88226b4 100644 --- a/hledger-lib/Hledger/Reports/BudgetReport.hs +++ b/hledger-lib/Hledger/Reports/BudgetReport.hs @@ -280,8 +280,8 @@ budgetReportAsText ropts@ReportOpts{..} budgetr = TB.toLazyText $ Nothing where costedAmounts = case cost_ of - Cost -> amounts . mixedAmountCost . normaliseMixedAmount - NoCost -> amounts . normaliseMixedAmount + Cost -> amounts . mixedAmountCost + NoCost -> amounts maybetranspose | transpose_ = \(Table rh ch vals) -> Table ch rh (transpose vals) | otherwise = id diff --git a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs index 3bdb5d2db..d46330ae1 100644 --- a/hledger-lib/Hledger/Reports/MultiBalanceReport.hs +++ b/hledger-lib/Hledger/Reports/MultiBalanceReport.hs @@ -449,7 +449,7 @@ sortRows ropts j sortFlatMBRByAmount = case fromMaybe NormallyPositive $ normalbalance_ ropts of NormallyPositive -> sortOn (\r -> (Down $ amt r, prrFullName r)) NormallyNegative -> sortOn (\r -> (amt r, prrFullName r)) - where amt = normaliseMixedAmountSquashPricesForDisplay . prrTotal + where amt = mixedAmountStripPrices . prrTotal -- Sort the report rows by account declaration order then account name. sortMBRByAccountDeclaration :: [MultiBalanceReportRow] -> [MultiBalanceReportRow] diff --git a/hledger/Hledger/Cli/Commands/Balance.hs b/hledger/Hledger/Cli/Commands/Balance.hs index 85146d707..ef96156dd 100644 --- a/hledger/Hledger/Cli/Commands/Balance.hs +++ b/hledger/Hledger/Cli/Commands/Balance.hs @@ -429,11 +429,7 @@ This implementation turned out to be a bit convoluted but implements the followi -- The output will be one or more lines depending on the format and number of commodities. balanceReportItemAsText :: ReportOpts -> BalanceReportItem -> (TB.Builder, [Int]) balanceReportItemAsText opts (_, accountName, depth, amt) = - renderBalanceReportItem opts ( - accountName, - depth, - normaliseMixedAmountSquashPricesForDisplay amt - ) + renderBalanceReportItem opts (accountName, depth, amt) -- | Render a balance report item using the given StringFormat, generating one or more lines of text. renderBalanceReportItem :: ReportOpts -> (AccountName, Int, MixedAmount) -> (TB.Builder, [Int])