clarify historical price field and tests
This commit is contained in:
parent
9bc286c352
commit
4248df5c6f
@ -123,7 +123,7 @@ data TimeLogEntry = TimeLogEntry {
|
|||||||
|
|
||||||
data HistoricalPrice = HistoricalPrice {
|
data HistoricalPrice = HistoricalPrice {
|
||||||
hdate :: Day,
|
hdate :: Day,
|
||||||
hsymbol :: String,
|
hcommodity :: Commodity,
|
||||||
hamount :: Amount
|
hamount :: Amount
|
||||||
} deriving (Eq) -- & Show (in Amount.hs)
|
} deriving (Eq) -- & Show (in Amount.hs)
|
||||||
|
|
||||||
|
|||||||
@ -175,15 +175,25 @@ hledgerdev -f - balance
|
|||||||
c $-30
|
c $-30
|
||||||
>>>= 0
|
>>>= 0
|
||||||
|
|
||||||
# 14. this should balance, ignoring the P
|
# 14. we ignore P, so this should balance
|
||||||
hledgerdev -f - balance
|
hledgerdev -f - balance
|
||||||
<<<
|
<<<
|
||||||
P 2011/11/15 EUR CHF 1.234
|
P 2011/11/15 EUR CHF 1
|
||||||
2011/11/19
|
2011/11/19
|
||||||
a EUR 1000.00
|
a EUR 1000.00
|
||||||
b CHF -1254
|
b CHF -1254
|
||||||
>>>= 0
|
>>>= 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
|
# 15. these balance because of the unit prices, and should parse successfully
|
||||||
hledgerdev -f - balance --no-total
|
hledgerdev -f - balance --no-total
|
||||||
<<<
|
<<<
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user