I have a problem when running bean-query - it's rounding numbers too much which leads to wrong results in csv file I generate from it.
Is there a way to force set `fractional_common` somewhere?
Ideas:
1. I use custom importer to produce transactions, maybe there is a way to automatically add two fractional zeroes to the transaction?
2. Or maybe I can set it explicitly for that currency?
3. For now I did this: add two fractional zeroes to most transactions manually, this will force fractional_common=2

Use case is that I'm tracking time in quarter increments (15 min = 0.25 hr) but most of my "transactions" are either full hours or half hours. This leads to deriving `fractional_common=1` which leads to reporting 15 minutes as 0.2 hours.

I attach file I used to illustrate the problem

$ bean-query test.beancount 'SELECT date, number WHERE account ~ "Expenses:Bills" AND month(date) = 5'
   date    numb
---------- ----
2019-05-03 15.5
2019-05-10 15.5
2019-05-20  5.2
-- SHOULD BE:
-- 2019-05-20  5.25

$ bean-doctor display_context test.beancount
USD             : sign=1   integer_max=4 fractional_common=1   fractional_max=2   "-0000.0" "-0000.00" __default__     : sign=0   integer_max=1 fractional_common=_   fractional_max=_   "0.*" "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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/e768b3db-31a6-17a3-3851-cfb8efdf2f93%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
;; -*- mode: org; mode: beancount; coding: utf-8; fill-column: 400; -*-

2019-04-01 commodity USD

2019-04-01 open Assets:Bank

2019-04-01 open Expenses:Bills

2019-04-01 open Income:Salary

; April
2019-04-02 * "Salary"
  Assets:Bank     1000 USD
  Income:Salary 

2019-04-03 * "Bill"
  Assets:Bank     -10.0 USD
  Expenses:Bills 

; May
2019-05-02 * "Salary"
  Assets:Bank     1000 USD
  Income:Salary 

2019-05-03 * "Bill"
  Assets:Bank     -15.5 USD
  Expenses:Bills

2019-05-10 * "Bill"
  Assets:Bank     -15.5 USD
  Expenses:Bills

2019-05-20 * "Bill"
  Assets:Bank     -5.25 USD
  Expenses:Bills

; June
2019-06-01 * "Bill"
  Assets:Bank     -10.0 USD
  Expenses:Bills 

2019-06-02 * "Salary"
  Assets:Bank     1000 USD
  Income:Salary

Reply via email to