- It doesn't truncate it only displays them that way, all numbers are
preserved
- Why does it use the most frequent? it's trying to guess what the right
thing to do is
- I've been wanting to add a fixed option for a VLT, even had a shot at
this a few months ago, but then I moved and got into something else and it
got lost (it's easily the top one thing I would fix if I had the time)

If the AGI can finally come already and take away the entire economy with
it and make my skills worthless I'll have a lot of time to fix Beancount
Ok later for now





On Thu, Sep 4, 2025 at 2:30 PM CD <[email protected]> wrote:

> Thanks Dan.
>
> I figured it out.  There were a lot of entries where there was only one
> decimal place.  ie - 54.8 USD   100.0 USD etc.  (1500 entries).
>
> I changed all of those to two decimals and the bean-query results now show
> two decimal places.
>
> Why would Beancount do that though?  If the items it brings up have two
> decimal points worth of information why would it truncate that?  I would
> understand if ALL of the transactions had one decimal point but it doesn't
> make sense for transactions that do have two decimal points of data.   I'm
> clearly not understanding something here.
>
> -Chris
>
> On Thursday, September 4, 2025 at 12:51:21 PM UTC-4 [email protected]
> wrote:
>
>> On 04/09/25 13:46, CD wrote:
>> > Prior to today I have mostly used fava to do queries but have been
>> > experimenting more with the command line.
>> >
>> > For some reason all of my output in the command line is rounded to 1
>> > decimal place even though the actual transactions have two decimal
>> > places.
>>
>> This is not the intended behavior.
>>
>> When formatting a table, beanquery rounds the numerical values in
>> columns of type `position` to the most common number of decimal digits
>> for the values in the column. `sum(position)` has type `inventory` but
>> the same applies for each currency in the inventory.
>>
>> Therefore, the only explanation for the behavior you observe, is that
>> the most common number of decimal digits for the values to be displayed
>> is 1 and not 2.
>>
>> You do not provide enough information to help you further. For this we
>> would need the exact query you are running and a minimum ledger that
>> results in the problem you describe.
>>
>> > This doesn't happen when I run queries from python scripts.
>>
>> The table formatting code is only used when displaying results via the
>> beanquery shell.
>>
>> Cheers,
>> Dan
>>
>> --
> 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 visit
> https://groups.google.com/d/msgid/beancount/06d75128-3345-42a7-9899-1c679e55d010n%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/06d75128-3345-42a7-9899-1c679e55d010n%40googlegroups.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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMXyd5p0SzO8JxPCRbJhthEutogcHzHh8Mw%2BTL722rTUA%40mail.gmail.com.

Reply via email to