beanprice icon indicating copy to clipboard operation
beanprice copied to clipboard

Price rounding

Open antage opened this issue 2 years ago • 0 comments

I expect beanprice shouldn't rounding any price. Due to beanprice writes prices with dcontext the rounding may happen.

$ bean-price -e 'RUB:yahoo/VTBR.ME'
2021-11-10 price VTBR.ME                           0.05053 RUB
$ bean-price current.beancount | grep VTBR
2021-11-10 price VTBR                                 0.05 RUB

current.beancount has commodity definition:

1970-01-01 commodity VTBR
  price: "RUB:yahoo/VTBR.ME"
$ bean-doctor display_context current.beancount
...
RUB             : sign=1   integer_max=5   fractional_common=2   fractional_max=2   "-00000.00" "-00000.00"
...
__default__     : sign=0   integer_max=1   fractional_common=_   fractional_max=_   "0.*" "0.*"

antage avatar Nov 10 '21 15:11 antage