Wappler Version : 6.5.0
Server Model: Node/Docker
Database Type: MySQL
Hosting Type: Digital Ocean Droplet
Just noticed everywhere (and we have hundreds) we have used a formatter on a number for currency (stored in database as decimal) we are seeing this error. Despite it being in the database as a decimal we have to format to number to alleviate the error?
Narrowed it down to the database driver. Reverted database connection driver to depreciated and all good. Obviously update to remote for MySQL 2 package for Node did not apply. Will work on it…
Very weird all fine local but remote just will not display the formatter correctly unless using the depreciated MySQL driver. Restarted the application, rebooted the server, checked everything and all matches the same as locally.
Added fine George, local all good, remote not so good. Will have a bite to eat and try to wrap my head around it.
There is no equivalent for DECIMAL in JavaScript, depending on the database driver the value is converted into a Number or a String. The Number type in JavaScript is a float and doesn’t have the same precision as the DECIMAL type of the database have and can cause data loss, so many database drivers return the value as a string instead.
Appreciated @patrick at least that explains it. I’m not going to moan that it has been the standard for years to store as decimal (intentional oxymoron). Won’t change anything. Adapt and survive.
Could you guys disable decimals from having the ability to have currency formatting applied to them (without first being converted to number of course) within the Expression Builder?