Developer forum

Forum » Ecommerce - Standard features » Rounding bug
Nuno Aguiar
Reply

Hi,

 

We found a bug in the rounding, where it's misscalculating the number of decimal places in 8.9.1.13

https://www.screencast.com/t/3svprBsBu

 

This is causing a very big problem for a customer of ours, because we are using integration, and the authorized amount on the credit card is less than what the ERP calculated (for the entire order).

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen
Reply

Hi Nuno

Could you ellaborate - Could you describe what you would expect? And does it work differently on other versions?

NP

 
Nuno Aguiar
Reply

Hi Nicolai,

 

I'd would expect that when I have 2 decimals set up, I'd get the behaviour I am getting now with 4 as decimal value. Looks like it's always deducting whatever the value have in the UI - 2.

Considering the screencast:

  • 0 decimals would return $70
  • 1 decimal would return $70.5
  • 2 decimals would return: $70.46
  • 3 decimals would return $70.463
  • 4 decimals would return $70.4634

 

I went to look at an old 8.5.1 solution and it's also behaving like that, but I was sure it was OK. So now I am confused. Can you at least explain why we're seeing the no decimal places with the setting as 0, 1 and 2?

 

Then I looked at my setting again and noticed the factor of 100... so now I look like a fool. Good thing is, I reached my daily quota on that, so there's no other way than up now :P

 

Best Regards,

Nuno

 
Nicolai Pedersen
Reply

:-)

 

You must be logged in to post in the forum