mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-28 04:46:31 +03:00
;lib: cleanup
This commit is contained in:
parent
76542458e6
commit
629b590de1
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user