Skip to Content
0
Apr 13, 2012 at 09:12 AM

SD Pricing: rounding problem when computing amount (vat exclude) from total amount (vat included)

38 Views

Hi All,

I've to compute an amount (vat excluded) from a total amount (vat include).

I use a percentage based condition therefore, the percentage is truncated after 2 decimals and the calculated amount is not correct.

Example: 171011.10 ( total amount vat included), tva=6%

Formula: amount (vat excl) = total amount * 100 / (100+6)

100/(100+6) = 0,943396226 = 94.3396226% => expected result=161331.23

due to 2 decimals limitation => 94.34% => obtained result=161331.87

error= 0.64

Does anybody have an idea about how to compute that correctly?

I thank you