diff --git a/hledger-lib/Hledger/Data/Types.hs b/hledger-lib/Hledger/Data/Types.hs index d9e18f1c0..e6f2ab67b 100644 --- a/hledger-lib/Hledger/Data/Types.hs +++ b/hledger-lib/Hledger/Data/Types.hs @@ -123,7 +123,7 @@ data TimeLogEntry = TimeLogEntry { data HistoricalPrice = HistoricalPrice { hdate :: Day, - hsymbol :: String, + hcommodity :: Commodity, hamount :: Amount } deriving (Eq) -- & Show (in Amount.hs) diff --git a/tests/prices.test b/tests/prices.test index 1e59b7ed1..4d306d2fc 100644 --- a/tests/prices.test +++ b/tests/prices.test @@ -175,15 +175,25 @@ hledgerdev -f - balance c $-30 >>>= 0 -# 14. this should balance, ignoring the P +# 14. we ignore P, so this should balance hledgerdev -f - balance <<< -P 2011/11/15 EUR CHF 1.234 +P 2011/11/15 EUR CHF 1 2011/11/19 a EUR 1000.00 b CHF -1254 >>>= 0 +# # 14b. if P worked, this should balance +# hledgerdev -f - balance +# <<< +# P 2011/11/15 EUR CHF 1.234 +# 2011/11/19 +# a EUR 1000.00 +# b USD 1000.00 +# c CHF -1254 +# >>>= 0 + # 15. these balance because of the unit prices, and should parse successfully hledgerdev -f - balance --no-total <<<