Developer forum

Forum » Ecommerce - Standard features » Rounding
Dynamicweb Employee
Thet Nong Phu
Reply

Dear Sir,

Our customer doesn't have the idea to use which rounding. So, I suppose to explain the calculation and function of rounding.

Based on the attached image, may I know how come result 16 comes out for amount 12.58 with factor 8? I will be appreciated if you could explain to me the calculation details.

Thanks

Phu

rounding.png

Replies

 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply
This post has been marked as an answer

Hi Phu,

You can read a bit more about round here: https://doc.dynamicweb.com/documentation-9/ecommerce/internationalization/currencies#sideNavTitle1-1

But the reason why you are getting 16 when you have selected 'Method' = Up and 'Factor' = 8 is because the value will be rounded up to the next integer number which is dividable with 8. So it would always be either 8, 16, 24, 32, 40, etc. And since the value you have entered is 12.58, the next value which is dividable with 8 will be 16.

What did you expect the value 12.58 to be rounded to?

Best regards,

Steffen

Votes for this answer: 1
 
Dynamicweb Employee
Thet Nong Phu
Reply

Hi Steffen,

Thanks for your details explanation of calculation. I got the answer now. I really appreciate your help.

Thank you!

Thanks

Phu

 

You must be logged in to post in the forum