Rounding Float/Currency

0
Hi All, I have a Product with a selling price calculated showing .00 dec. The problem that when the quantity is more than one it works off .000 dec and doesn't round off correctly. I am making an a microflow to check if the quantity = 1 continues as normal else check total <= "wildcard"."wildcard""wildcard"4 or ."wildcard""wildcard"4 then - 0.01 else + 0.01 This should fix the rounding problem My Problem though is what do I use as a wild card % and _ doesn't work it seems? Regards, Update Example: There's a product A: Cost price 3639.14 margin of 20% So the selling price is 4366.968 When you add this to a quote The Rand Value is R4 366.97 This is also correct. But now i add quantity as 4 it should be R17 467.88 but because of that extra .008 cents it rounds the price to R17 467.87
asked
1 answers
0

You could use a regex to check the number. For more info and examples about regular expressions I always go here.

I am still not sure what you want to achieve. Mendix uses banker's rounding . Do you want to do your own rounding by checking the second digit behind the decimal mark?

Regards,

Ronald

answered