Home » RADICORE development » Framework » Problem with Numeric Field
|
|
|
Re: Problem with Numeric Field [message #3006 is a reply to message #3005] |
Wed, 20 June 2012 04:58   |
AJM
Messages: 2382 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I have tested this on my local PC and I cannot duplicate the problem. Input of '175000' or '175,000' is reformatted to '175000.00' for internal use, and changed to '175,000.00' when displayed on the screen.
The only way that this would be displayed as '175.000,00' is if you locale setting says that:
- decimal point is ',' (comma)
- thousands separator is '.' (period)
The formatNumber() and number_unformat() functions use the same locale settings, so I cannot see how they can get out of step.
Can you step through with your debugger and see what happens inside both of these functions?
[Updated on: Thu, 31 July 2014 03:55] Report message to a moderator
|
|
|
|
Re: Problem with Numeric Field [message #3008 is a reply to message #3007] |
Wed, 20 June 2012 15:17   |
AJM
Messages: 2382 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Your locale (language = Spanish) was displaying the value "175,000.00" as "175.000,00", but because the field was set to 'noedit' the value was not being returned in the $_POST array. This meant that it was still set to "175,000.00" when it went through the number_unformat() function in the wrong format.
I've made a few tweaks to two scripts (see attached file). Can you let me know if it fixes your problem.
[Updated on: Thu, 31 July 2014 03:54] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sun Jul 06 11:14:44 EDT 2025
Total time taken to generate the page: 0.01846 seconds
|