Closed simonmichael closed 5 years ago
This issue is marked "closed" and so therefore seems to be rejected. But the bug still exists (in version 1.14 at least) If I set a price thusly P 2020/01/16 ZAR 0.0533172 then this price is correctly used in hledger and an amount 10,000 ZAR is shown with -V value 533.17 However the prices report incorrectly shows the price like this P 2020/1/16 ZAR 0.05 The commodity format is used but it should not be! This is a price, and all digits are significant. The prices report is essentially deeply flawed if not useless while this bug exists.
Hi @psb777, I can't reproduce this with latest or 1.14. Could you show a reproducible example.
Sorry @simonmichael, this shortest of examples makes the point rather well :-)
$ cat x.ledger
commodity 1,000,000.
P 2020/01/16 XRP 0.17474
$
$ hledger -f x.ledger prices
P 2020-01-16 XRP 0
Ah there it is, thanks. Indeed the bug was still in 1.14, it was fixed by 1.16: https://hledger.org/release-notes.html#hledger-cli-1-16.
A confusing bug that bit me several times: if you had a
commodity
directive limiting a commodity's precision, say to two decimal places, that would also affect the output of theprices
command. Nowprices
shows market prices (whether declared by P directives or inferred from --costs/--inverted-costs)