| Numbers changing from 57,00 -> 57000000 [message #7945] |
Tue, 21 July 2026 11:42  |
htManager
Messages: 459 Registered: May 2014
|
Senior Member |
|
|
Hi Tony,
I updated from v 2.30.0 (not 2.31.0) to v 2.34.0 and now I have problems with the number values. I have a popup from where the numbers are filled in correctly. The value in $fieldarray is "57,00" but if I press submit, the value in std.table.class.inc->custom_popupReturn() line 1662 is correct but in std.table.class.inc->popupReturn() line 7631 the value ist 57000000.
Changing the includes directory back to v 2.30.0, everything works fine again.
Is this a bug or is this because of a wrong number format '.' instead of ','?
[Updated on: Tue, 21 July 2026 16:46] Report message to a moderator
|
|
|
|
|
|
|
|
| Re: Numbers changing from 57,00 -> 57000000 [message #7948 is a reply to message #7947] |
Fri, 24 July 2026 04:56   |
AJM
Messages: 2395 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I have tried this in my development environment and I cannot reproduce this error. I amended a form in my XAMPLE subsystem to include a popup on the X_PERSON table which contains a column called VALUE2 which is numeric with 2 decimal places. By setting my language to French or German the value '57.0' was correctly displayed as '57,00' both on the X_PERSON table and in the popup. I should point oit that the VALUE2 column needed to appear in the $fieldspec array with the correct specifications so that the value could be recognised as a number and dealt with accordingly.
I was going to upload my test code to the RADICORE server so that you could see the results, but unfortunately I am unable to upload anything due to a fault on my server.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
| Re: Numbers changing from 57,00 -> 57000000 [message #7950 is a reply to message #7949] |
Sat, 25 July 2026 05:02   |
AJM
Messages: 2395 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
There is nothing in the framework that I can see which would change how calculations are performed in your code. The only difference is that a change in language may change how a number is displayed, but my testing has shown that there is nothing wrong with this formatting. As I don't have access to your code I cannot see where the value is being formatted incorrectly. You need to step through the code with your own debugger to see precisely where the fault is located.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
| Re: Numbers changing from 57,00 -> 57000000 [message #7951 is a reply to message #7950] |
Sat, 25 July 2026 10:31  |
AJM
Messages: 2395 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I have managed to upload my test scripts onto the server to show that my code works as expected. You can run the same test as follows:
1) Logon as user 'demo-de' with password 'demo'
2) Select the PROTO menu.
3) Select the EXAMPLE menu.
4) Select the PERSON task. This will show screen x_person(list1).php.
5) Click the 'Id' label twice to display the entries in alphabetical order with 'AJM' as the first user. You will see 'value2' displayed as '1.234,56' which is '1,234.56' formatted for German.
6) Select the 'test_autoincrement' button on the menu bar. This will show screen 'test_autoincrement(list1).php' with a single entry.
7) Selecet this entry and press the 'Update' button in the navigation bar. This will show screen 'test_autoincrement(upd1).php'
Select the popup button to the right f the Person ID label. This will shown screen 'x_person(popup1).php'.
9) Select the first entry for 'AJM' which has '1.234,56' in the 'value2' field and press the CHOOSE button in the action bar. This will return to screen 'test_autoincrement(upd1).php'.
10) Note the the 'value2' field shows '1.234,56' as expected.
10)
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|