On Friday, April 20, 2018 at 2:36:58 PM UTC-4, Richard wrote: > > It appears that it get silently "cropped/rounded" by the backend field > type configuration... If I have field with 2 places in the backend and 3 > places defined in the models and input 0.647, it will be stored as 0.65. > > Do we have control over the rounding in web2py or it configure in the > database engine?? >
web2py has no control over what the database does (other than its ability to initially define the precision of the database column if web2py is used for a migration to create the database table). So, first make sure your database column is defined with the decimal precision you want. On the web2py side, you can control the precision of the inputs however you want -- web2py will simply pass those inputs to the database. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.