From 629b590de1526508e6308eafed043ddd1446c218 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 5 May 2019 10:38:13 -0700 Subject: [PATCH] ;lib: cleanup --- hledger-lib/Hledger/Data/MarketPrice.hs | 9 +++++++++ hledger-lib/Hledger/Reports/BalanceReport.hs | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hledger-lib/Hledger/Data/MarketPrice.hs b/hledger-lib/Hledger/Data/MarketPrice.hs index e80044e14..7afd8debf 100644 --- a/hledger-lib/Hledger/Data/MarketPrice.hs +++ b/hledger-lib/Hledger/Data/MarketPrice.hs @@ -42,3 +42,12 @@ postingValueAtDate j d p@Posting{..} = p{pamount=mixedAmountValue prices d pamou -- prices are in parse order - sort into date then parse order, -- & reversed for quick lookup of the latest price. prices = reverse $ sortOn mpdate $ jmarketprices j + +-- -- | Find the best commodity to convert to when asked to show the +-- -- market value of this commodity on the given date. That is, the one +-- -- in which it has most recently been market-priced, ie the commodity +-- -- mentioned in the most recent applicable historical price directive +-- -- before this date. +-- -- defaultValuationCommodity :: Journal -> Day -> CommoditySymbol -> Maybe CommoditySymbol +-- -- defaultValuationCommodity j d c = mpamount <$> commodityValue j d c + diff --git a/hledger-lib/Hledger/Reports/BalanceReport.hs b/hledger-lib/Hledger/Reports/BalanceReport.hs index 529dda138..a1481323c 100644 --- a/hledger-lib/Hledger/Reports/BalanceReport.hs +++ b/hledger-lib/Hledger/Reports/BalanceReport.hs @@ -202,14 +202,6 @@ brValue ropts@ReportOpts{..} j (items, total) = today = fromMaybe (error' "brValue: ReportOpts today_ is unset so could not satisfy --value-at=now") today_ --- -- | Find the best commodity to convert to when asked to show the --- -- market value of this commodity on the given date. That is, the one --- -- in which it has most recently been market-priced, ie the commodity --- -- mentioned in the most recent applicable historical price directive --- -- before this date. --- -- defaultValuationCommodity :: Journal -> Day -> CommoditySymbol -> Maybe CommoditySymbol --- -- defaultValuationCommodity j d c = mpamount <$> commodityValue j d c - -- tests