Value of numeric fields rounded on New Record

A place for users and developers of the Xataface to discuss and receive support.

Value of numeric fields rounded on New Record

Postby silma » Fri Aug 05, 2011 2:25 am

Hello Steve, hello everybody,

I'm experiencing a strange behaviour in my app : Sometimes, when users insert a new record, a field with numeric value will be rounded.

IE, in an invoice table, i've got a "consumption" field : If i put "1563.32" inside and save ,the recorded data will be 1563.00.

However, it once happen on 15 , or 50, or 100, randomly, and i can't find why. The values are similar to others.
Users told me that it happened since the beginning, on all the numeric fields.
I didnt noticed it before because it wasn't critical... except for consumption in tons !

Has anybody experienced the same thing ?
I'm using Xataface 1.3rc4 (I'll do the update next week, thanks for the release Steve)

Thanks a lot for your help.

Silma
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Re: Value of numeric fields rounded on New Record

Postby shannah » Fri Aug 05, 2011 5:17 pm

What kind of field/widget is this using?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Value of numeric fields rounded on New Record

Postby silma » Sun Aug 07, 2011 11:39 pm

Hello,

They all look like this :

Code: Select all
[Consommation]
widget:label = "Consommation"
widget:description = "Consommation totale pour la période."
validators:regex = "/^.{0,11}$/"
validators:numeric = true
validators:regex:message = "Le champ Consommation doit être composé de chiffres."
validators:required = true
validators:required:message = "Merci de remplir le champ Consommation"
order=5
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Re: Value of numeric fields rounded on New Record

Postby shannah » Mon Aug 08, 2011 9:17 am

What mysql field types are they? float? decimal?, etc...

I think this issue may be fixed in 1.3rc6. (You can just update the Dataface/Serializer.php file for this fix).
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Value of numeric fields rounded on New Record

Postby silma » Mon Aug 08, 2011 11:36 pm

They are decimal(11,2).

Thanks a lot for you work steve, i'll update now.
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 14 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved