I'm not familiar with the # 100.00 EUR syntax that you are using; but
running bean-report {file} print shows how this is being interpreted and
this might help:
$ bean-report foo.bean print
2022-01-29 open Income:Other
2022-01-29 open Assets:CoinA COINA
2022-01-29 open Assets:CoinB COINB
2022-01-29 commodity COINA
2022-01-29 commodity COINB
2022-01-29 * "Income"
Income:Other -100.00 EUR
Assets:CoinA 1.00 COINA {100 EUR, 2022-01-29}
2022-01-29 * "Convert"
Assets:CoinA -1.00 COINA *{100 EUR, 2022-01-29}*
Assets:CoinB 2.00 COINB *{50 EUR, 2022-01-29}*
I tried to run bean-doctor parser to see how this was being parsed but it
throws errors in the yacc/lex interface. (Likely code rot)
I suspect you might be looking for the '@' syntax for cost specifications?
Hope this helps
Alan
On Saturday, January 29, 2022 at 6:35:58 PM UTC [email protected]
wrote:
> I have a question. It is either something I don't understand about the
> cost system or a bug. Why does the following code snippet balance?
>
> 2022-01-29 commodity COINA
> 2022-01-29 commodity COINB
>
> 2022-01-29 open Income:Other
> 2022-01-29 open Assets:CoinA COINA
> 2022-01-29 open Assets:CoinB COINB
>
> 2022-01-29 * "Income"
> Income:Other -100.00 EUR
> Assets:CoinA 1.00 COINA {# 100.00 EUR}
>
> 2022-01-29 * "Convert"
> ; Why does this transaction balance?
> Assets:CoinA -1.00 COINA {# 100.00 EUR}
> Assets:CoinB 2.00 COINB {# 200.00 EUR}
>
> Shouldn't the transaction give -100.00 + 200.00 = 100.00 != 0?
>
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/e2feacd4-12e3-46ef-8a1d-54c23c08da31n%40googlegroups.com.