Closed pablocarrillo closed 10 years ago
Is there a reason you need this to be a float rather than a string? I don't seem to be able to keep it in a consistent format so far (I'm trying).
For 27.99 as a string
I can get it to
but not a float as 27.99.
Ive just had to put something on Stackoverflow for this one!!
Hi Paul,
Well for this I reckon the float are quite tricky. I use in my en a special type "decimal" that keep the correct number of decimals. On the other hand if we all agree to keep this always as a string with this format (no commas and the dot for decimals) I think we can work with this. On the other hand, has a price as a number kind of make sense, because it is a number.
Cheers
Ive noticed that this is coming out of the DB in a shorted format as well. If 8.00 is viewed as a float its concatenated to 8. If I number format at number I can get it to 8.00 but its cast to a string.
Its easier (for me at least) if I can always provide them as strings. If you need to operate on them then I can keep researching the best way to do this but if you're just displaying them then strings are quicker to provide.
Ok, let them as a string for now in cycle and I will inform tomorrow Danielle about this and update my test accordingly.
Happy with this one?
Yes, we can close it and move this and #54 to staging as soon as you can, please.
Hi Paul,
On the cycle server after refactor I found that the price is coming as string and it is doing fail several of my test. (Thats the only thing, if I allow that field as string everything is fine)