You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discussed in #hledger today: when entering a stock sale with hledger add, including the cost basis with @ notation, if you leave the last amount blank, expecting hledger to calculate the capital gain/loss, instead it will balance the transaction with both amounts. Ie you end up with the not-so-useful:
When parsing this entry hledger normally converts to cost and infers a $-10 balancing amount for the last posting; we think hledger add should do the same.
The text was updated successfully, but these errors were encountered:
It might be useful for hledger add to check what the commonly-used commodity is for any particular account (so, using USD for Income:CapitalGains if USD is the most common commodity for that account).
But then again, the two issues aren't fully equivalent. In this issue, it's a matter of explicit conversion, where cost is provided, and in the other, no cost is provided and so it is a question of whether an implicit conversion ought to be performed.
Discussed in #hledger today: when entering a stock sale with
hledger add
, including the cost basis with @ notation, if you leave the last amount blank, expecting hledger to calculate the capital gain/loss, instead it will balance the transaction with both amounts. Ie you end up with the not-so-useful:rather than:
or (equivalently):
When parsing this entry hledger normally converts to cost and infers a $-10 balancing amount for the last posting; we think
hledger add
should do the same.The text was updated successfully, but these errors were encountered: