Try setting the tolerance for the instruments

  option "inferred_tolerance_default" "SMG-ASIE:0.000005"

The rendering code is buried in here somewhere:
https://github.com/beancount/beancount/blob/master/beancount/query/query_render.py

All that code will be thrown away and get rewritten eventually.
Patches are welcome in the meantime.


On Tue, Apr 6, 2021 at 6:07 PM francois PEGORY <pfrancois...@gmail.com>
wrote:

> unfortunatly it don't work. because if do this. some operations does not
> balance.
> example with option "inferred_tolerance_default" "EUR:0.01", it balance
> well. with option "inferred_tolerance_default" "EUR:0.0005" , it does not
> balance anymore ...
>
> 2019-09-30 * "Achat" ""
>   Assets:Titre:PEE        0.7996 PEEB {125.055 EUR, 2019-09-30}
>   Assets:Titre:PEE        2.4955 PEEE {40.0720 EUR, 2019-09-30}
>   Assets:Titre:PEE:Cash  -200.00 EUR
>
> Le lun. 5 avr. 2021 à 23:42, Martin Blais <bl...@furius.ca> a écrit :
>
>> Precision selected for BQL is a bit of a mess.
>> Just another reason why it needs a rewrite.
>> This is really gnawing at me, but I just don't have the cycles to
>> rewrite it
>> Try this in the meantime:
>>
>> option "inferred_tolerance_default" "EUR:0.0005"
>>
>>
>>
>> On Mon, Apr 5, 2021 at 4:08 PM francois PEGORY <pfrancois...@gmail.com>
>> wrote:
>>
>>> i have a problem with decimal of commodities.
>>> my stocks have 5 decimal for units but euro have only two decimals.
>>>
>>> so basically here i have a buy operation.:
>>> 2021-02-09 * "Achat" "100"
>>>   Assets:Titre: Assurance-vie                   0.081869 SMG-ASIE
>>> {232.69 EUR, 2021-02-09}
>>>   Assets:Titre: Assurance-vie                   1.498820 ODDO-PATRIMOINE
>>> {25.42 EUR, 2021-02-09}
>>>   Assets:Titre: Assurance-vie                   0.273118 ODDO-CONV
>>> {139.50 EUR, 2021-02-09}
>>>   Assets:Titre: Assurance-vie                   0.021467 ODDO-AVENIR
>>> {4436.98 EUR, 2021-02-09}
>>>   Expenses:Frais-bancaires              9.50 EUR
>>>   Assets:Titre:Assurance-vie:Cash      -200 EUR
>>>
>>> and the problem is if i do a BQL :
>>> SELECT
>>> account, units(sum(position)) AS quantity
>>> WHERE
>>> account ~ "Generation"
>>> GROUP BY account
>>> ORDER BY account
>>>
>>> the quantity is with only two decimals not five :(
>>> how i can do it ?
>>>
>>> regards
>>>
>>> --
>>> 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 beancount+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/CALUWbLf2eBhyOA8G59B8p-gxXof6k_Sn9Nv3RjEe088ia_N27A%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/beancount/CALUWbLf2eBhyOA8G59B8p-gxXof6k_Sn9Nv3RjEe088ia_N27A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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 beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/CAK21%2BhOUXTz8urpS2L5OiOPsadQryDxXFhtE%3DiMrE%3D%2B35XTVhQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhOUXTz8urpS2L5OiOPsadQryDxXFhtE%3DiMrE%3D%2B35XTVhQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CALUWbLdpACRTkKV8fU-Gu-0EcS_fddNTSeFHWL3f_8qNJx_BNQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CALUWbLdpACRTkKV8fU-Gu-0EcS_fddNTSeFHWL3f_8qNJx_BNQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPG7rgcB0%2BYL9vr44vi8GVrPTWDEapgXu1ocjG_izi1Cw%40mail.gmail.com.

Reply via email to