Jump to content

Very big bug on cart calculation


Tárraga

Recommended Posts

I have been searching for months for a solution to this error I've found which seems to me quite serious.
It's an error that is seen with the naked eye.

The steps to reproduce it are very simple:
Product - 165.21€ tax excl. with a 50% reduction
Shipping - 24.42€ tax excl.

1028969459_Capturadepantalla2020-11-11alas11_18_02.jpg.a23da2089d574c37567b665f634c8052.jpg

 

As you can see, the total is 130.21€ with taxes included, but the operation to calculate tax should be total price tax excl * tax rate / 100. I'm using a 21% fee.

So, (82.61 + 25.42) * 21 / 100 = 22.6863 which rounded is 22.69€ while PrestaShop shows 22.68€

I think PrestaShop is not rounding the price calculation when it has a discount, product price with tax included is 99.95€ tax included when it should be 99.96€
165,21 * 50 / 100 = 82.605€ * 1.21 = 99.95€

Tools::ps_round(165,21 * 50 / 100, 2) = 82.61€ * 1.21 = 99.9581 ~ 99.96€

 

Edited by Tárraga (see edit history)
Link to comment
Share on other sites

11 minutes ago, Pablus said:

Hola Tárraga, fíjate las opciones de redondeo de ps

 

Screenshot_3.png

 

No importa qué opción elija de las tres, sigue calculando el mismo precio erróneo.
No matter which option you choose out of the three, it still calculate the same wrong price.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...