← Back to team overview

openerp-expert-accounting team mailing list archive

Re: Floating point precisions, balanced entries and VAT included reflex

 

Hey Geoff,

2010/3/5 <geoff.gardiner@xxxxxxxxx>

> On , Raphaël Valyi <rvalyi@xxxxxxxxx> wrote:
> > ...
> > Two solutions are possible : ...
> > This is ok but I think solution 1) is simpler and would resolve the
> currency problem.
>
> An engineer might believe that but I think I am correct in saying that an
> accountant would not accept it. And I think that multicurrency is a
> different problem from accounting precision within a single currency.
>
> > I'm not sure if that would need to be done in the tax_included module
> only or generally. But it might be done this way always because as Sebastien
> explains it seems that there is an issue with VAT computation even if it
> doesn't show up as long as you stick with 2 digit floating precision
> everywhere.
>
> I think I am correct in saying that whenever an amount is posted in the
> accounts, accountants require the value to be rounded to exact digits. So
> each individual line entry is rounded (as [2], I think).
>
> As I said yesterday, a qualified accountant in the UK told me that nobody
> will use a system that rounds floats for accounting entries - only fixed
> point arithmetic will do (and there is a fixed point module available for
> Python).
>

That's cool to see we then seem to agree on every points! (I commented too
that I disagree with Sebastien that 1) would be better and suggest rounding
too). This proves engineers can understand accountants eventually ;-). BTW,
I commented on the blueprint too, I agree with your points.

>
> > What do you think about it? Does it demonstrate 4,61 and 6,34 are
> irrational numbers just like Pi or sqrt(2) ?
>
> Accountants don't deal in irrational numbers! But OpenERP SA are already
> changing things to Decimal anyway, aren't they?
>

Iv'e seen nothing in that direction yet. I think Tryton made some steps in
that direction (they started to use Decimal I think) but I'm not sure if
that is for this specifically.

Raphaël Valyi
http://www.akretion.com

Follow ups

References