Oh, by the way. It isn't an answer to your question exactly, but the syntax 
gets generated by beangulp, which in turn uses beancount.parser.printer.

Beangulp 
line: https://github.com/beancount/beangulp/blob/master/beangulp/extract.py#L133

Op zondag 30 januari 2022 om 02:29:23 UTC+1 schreef Alan H:

> Martin; Is there a pointer to the cost spec that includes / explains the 
> '#' notation. I will admit I didn't find it.
> Alan
>
> On Sun, 30 Jan 2022 at 00:27, Martin Blais <[email protected]> wrote:
>
>> Oh wow... it's subtle:
>>
>> 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}*
>> *^^^ here this gets matched against 1.00 COINA in the Assets:CoinA 
>> account, and so resolved against that posting.*
>>
>>   Assets:CoinB   2.00 COINB *{50 EUR, 2022-01-29}*
>> *^^^ here this has a degree of freedom in the per-unit cost, and that 
>> gets filled in to -100, in order to balance with the other posting in the 
>> transaction.*
>>
>> Behavior is as expected, but admittedly confusing.
>> Remember:
>> - reducing (closing) transactions will be matched against existing 
>> inventory
>> - augmenting (opening) transactions will be interpolated when necessary.
>>
>>
>>
>>
>> On Sat, Jan 29, 2022 at 7:21 PM Martin Blais <[email protected]> wrote:
>>
>>> Looks a bug to me.
>>> I think your interpretation is correct.
>>>
>>>
>>> On Sat, Jan 29, 2022 at 1:36 PM Thomas den Hollander <
>>> [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/7d06d7e7-c000-42cf-ae5d-1b67beba69d0n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/beancount/7d06d7e7-c000-42cf-ae5d-1b67beba69d0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>>
> You received this message because you are subscribed to a topic in the 
>> Google Groups "Beancount" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/beancount/majra9X_W_w/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beancount/CAK21%2BhMaBo-Ye4riOLjxfcsgekPxsWyYDe-3srKK2YU8Y8pYCQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhMaBo-Ye4riOLjxfcsgekPxsWyYDe-3srKK2YU8Y8pYCQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> a l a n a t p o l y p h a s e d o t c a
>

-- 
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/1e114303-7e21-4fbf-a73f-ef2a9b966f8en%40googlegroups.com.

Reply via email to