Android Question [SOLVED] Bug with double????

makis_best

Well-Known Member
Licensed User
Longtime User
Hi.

I have a table with 4 columns Quantity, Price, Total and add to order.
When I add quantity and Price in column total I see the result
For example if I put in quantity 100 and in price 11.4307
then I get total as 1,143.07.

After that I press the Add to order button witch read the total column
my program stop working and I get one error message saying about invalid double.


Why that happens?
It is about decimal format?

I use Table CustomView Version 3.02 and Android 8 with B4A 9.50

Thank you
 

makis_best

Well-Known Member
Licensed User
Longtime User
I understand what you say @Erel but there is no way just to change all the number format all over the application?
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
The code I use to fill the cell
B4X:
ItemTable_All_Items.SetValue(5, row, NumberFormat(Quantity1 * ItemTable_All_Items.GetValue(3, row), 0, 4))
I just want to have 4 digits after decimal.
 
Last edited:
Upvote 0

advansis

Active Member
Licensed User
Longtime User
What about storing the real value used for calculation (multiplied by 10000 and rounded) in an hidden column?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…