Afterbrowse Lookup NuNumber value incorrect
Posted: Fri Jun 27, 2025 4:06 pm
Hi all,
Currently I am having strugles with formatting my NuNumbers in the correct monetary format.
I have a Lookup object in a subform that uses an after browse PHP code to automatically fill the other object in the same subform row.
However, when performing the following after browse code, the value is shown 100x as high.
The artikel_standaardprijs is the standard price of an article. This artikel_standaardprijs is in the database stored as an decimal(10,2). This value needs to be filled in as the offerteitem_stukprijs, with a nunumber format of '€ 1.000,00'.
What now happens is the following. For instance, the artikel_standaardprijs is '19.00' in the database. When I perform the lookup, the offerteitem_stukprijs shows '€ 1.900,00' instead of '€ 19,00'. With all the other object in my nubuilder environment it handles the differences in . and , correctly.
Thanks in advance for your help
Currently I am having strugles with formatting my NuNumbers in the correct monetary format.
I have a Lookup object in a subform that uses an after browse PHP code to automatically fill the other object in the same subform row.
However, when performing the following after browse code, the value is shown 100x as high.
Code: Select all
$lu = nuLookupRecord();
nuSetFormValue('offerteitem_stukprijs', $lu->artikel_standaardprijs);
What now happens is the following. For instance, the artikel_standaardprijs is '19.00' in the database. When I perform the lookup, the offerteitem_stukprijs shows '€ 1.900,00' instead of '€ 19,00'. With all the other object in my nubuilder environment it handles the differences in . and , correctly.
Thanks in advance for your help