* Muke Tever <
koh...@gmail.com> [2022-01-03 18:54]:
> Oh, I see the problem, and I guess it's a little different than I
> thought. So amount and market(amount) doesn't 'balance' to zero,
> but they do 'balance' in the sense that ledger doesn't complain
> about it being unbalanced, if they exist as a regular transaction:
> 2022/01/02 Interest
> Assets:OBJ 1 OBJ {$5.00} [2022/01/02]
> Income:OBJs $-5.00
Yes and no.
The example you give only works because ledger assumes that a
transaction with two commodities balances. (It does an implicit
conversion. There was some discussion about this recently, in which I
argued that ledger should not do this.)
If you introduce a third commodity in your example it will not
balance:
2022/01/02 Interest
Assets:OBJ 1 OBJ {$5.00} [2022/01/02]
Income:OBJs $-5.00
A -10 EUR
B 10 EUR
You need the @ on the first posting.
BTW, given 1 OBJ {$5.00} I once argued that the cost should set the
price (i.e. @ $5.00 should be implicit if no other @ is given).
I still think that makes sense but it's not how ledger works.
I think it's this one:
https://github.com/ledger/ledger/issues/630