maddie

Cents not rounding correctly

Discussion created by maddie on Aug 8, 2014
Latest reply on Aug 8, 2014 by nickchapin

In a point of sale system, my client wants to see the change presented in a two decimal format. The calculation I'm using is

 

Round ( Sales::Amt Tendered - Sales::Total ; 2 )

 

as the amt tendered is greater than the total price of the sale. If I were to process a sale and the total was $131.05 and the customer gave me $131.15 their change would be ten cents. Unfortunately whenever the change variable has a 0 as the second decimal place it will not show. So instead of showing .10 as a change, it is showing .1 as change.

 

The round should work as it's set to 2 decimal points, and I can't add decimal points either, that's impossible. Even if it were if I were to add .000 the change might show up as .100

Outcomes