AnsweredAssumed Answered

How to round a currency calculation to (always) 2 decimals

Question asked by larslucidor on Feb 27, 2016
Latest reply on Feb 27, 2016 by siplus

I've created a script that calculates how much each member in a group will pay for a certain activity. The script creates a unique table with records that have values with none or many decimals. I wish to have maximum two decimals and that it all ends upp with either a floating window or a dialogue box telling me [sample]:

 

"[User], this is the result:

 

Eric pays 23.50 €

Sammy pays 1.00 €

Helen pays 39.56 €

"

 

Sofar I only managed to create a dialogue box that after use of Round returns either 2, 1 or 0 decimals. I always want 2 decimals for currencies, even if the result is exactly 1 €. It does not look professional when 23.50 €  automatically is showed as 23.5 € , the next is showed 1 € while the last is 39.56 €.

 

I guess there should be an easy solution to this?

Outcomes