The easiest workaround is to use INTEGER and leave all amounts in
cents, i.e. 123 instead of 1.23.  If all math is done with the implied
decimal point on integers, you will never have floating-point round-
off errors.  Only put in the decimal point when you are ready to
display the value.  (Massimo -- Maybe a validator can help here?)

-- Joe B.

On Mar 20, 12:03 pm, Paco <[email protected]> wrote:
> I've been trying web2py for a couple of days and I believe is just
> great. I'm so excited that I'm planning to build my own accounting and
> invoicing application, which is, in the other hand, not so complex in
> my case.
>
> I need (and I believe many more people do) a DECIMAL field type or
> maybe a CURRENCY type since there are many applications that need
> fixed precision numbers.
>
> It seems to me that is shouldn't be very difficult to do since most
> databases, including SQLite, support NUMERIC or DECIMAL types.
>
> It would be a great new feature. Are there any plans to do such a
> thing? Or maybe there is a nice workaround to do this in web2py?
>
> Cheers,
> Paco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to