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