Scenario: You are a cow dealer, and the price of cows climbs from 100 USD/COW to 250 USD/COW over 2 years.
assets:cows COW1 ; one cow at 100USD
assets:cows COW4 ; buy more cows, price around $250/btc
The resulting web display shows
COW5 @@ USD100
This would be fine, if you ignore the @@USD100 part.
But the way the information is presented, it would seem that you bought 5 cows for 100 apiece, ignoring the 4 cows that cost 250.
Suggested fixes. Either:
-- don't display the stuff after the @@ in the web ledger.
-- or for the stuff after the @@, divide 1100 by 5, to show the price of cows over the period being queried
For simplicities sake, I would suggest the former.
As a side note, possibly this type of transaction should be disallowed, because it doesn't satisfy the accounting equation. That is to say, each transaction should zero out for both units. I'll file that as a separate issue.
Suggested fix: don't display the stuff after the @@ in the web ledger.
I'm curious how this behaves in command line mode, but I have been using only web ledger so far.
Should I bug this up, and what's the "official" bug tracker now, google groups or github?
I'm pretty sure it's using the right prices internally - it's just displaying them wrongly. Removing prices from hledger-web's accounts sidebar seems a good quick fix. The balance command doesn't show prices either.
web: don't show prices in the accounts sidebar (fixes #114)