Prestashop: Bad price amount when specific prices by quantity are applied and delivery address is on a country with price with tax excluded

Created on 14 Oct 2019  Â·  10Comments  Â·  Source: PrestaShop/PrestaShop

Describe the bug
When a product has specific prices by quantity and customer has a delivery address in a country where prices are tax excluded, a bad price amount is applied.
It occures only when specific prices are configured "amount" and "tax included".

To Reproduce

  1. In back office: set up a product with specific prices by quantity with "amount" and "tax INCLUDED"
  2. On front office, try to order a product with specific prices configured before
  3. Go to cart
  4. Go to checkout
  5. Register an address in a country where no taxes
  6. Validate addresse
    => you see the products subtotal with a bad amount

Screenshots
Back office configuration:
image

Order with country with tax included:
2019-10-14_15-04-10

Order with country with tax excluded => bad price !
2019-10-14_15-03-49

Additional information
PrestaShop version: 1.7.6.1
PHP version: 7.2

It seems this bug occurs in file classes/tax/TaxCalculator.php in the function "getTotalRate" because, when a country is excluded tax, this function return "0" so, the amount of specific prices stays included tax instead of excluded tax.

1.7.5.2 1.7.6.1 Bug Checkout FO Minor Shopping carts FO Taxes and Prices To Do Workaround available

All 10 comments

Hi @bm-services,

Thanks for your report.
I manage to reproduce the issue with PS1.7.6.1 & PS1.7.5.2
It is displayed like this
image
But it is incorrect
It should be like this
image

If I try to change the "Price display method" of your customer to "Tax excluded" => It is OK
I’ll add this to the debug roadmap so that it’s fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Ping @marionf, this issue should be added to this epic: https://github.com/PrestaShop/PrestaShop/issues/15816
Thanks!

@khouloudbelguith Could you please add some details here:

  • What is the product price tax excluded ?
  • What is the VAT for the product ?
  • The specific price is in amount tax included ?
  • Prices are displayed tax included or excluded ?

Hi @marionf,

What is the product price tax excluded?

It is 200 Euro
image

What is the VAT for the product

10% only for France
image

The specific price is in amount tax included?

Yes, it is Tax included
image

Prices are displayed tax included or excluded ?

It is Tax included.

Thanks!

@khouloudbelguith

I can't reproduce the issue with 1.7.6.1

capture d'écran_2076

Prices are displayed tax included
capture d'écran_2077

Prices are displayed tax excluded
capture d'écran_2078

Did you use an address with a country where you don't pay taxes ?

Hi @marionf,

In your case, you need to select an address in a country where no taxes in the second step (checkout page) => so prices will be displayed in tax excluded.
https://drive.google.com/file/d/1elIL66i4QbPaRcfmv3yFORignbXdSQLr/view
Thanks!

@khouloudbelguith @bm-services

Ok, I understand.
However, this is normal behavior as you defined a discount of 11€ tax included, if there is no tax in the country it's equal to 11€ tax excluded. You need to create 2 specific prices, 1 for each country or define your specific price tax excluded

Ok but product prices are wrong, in my example: 17.8€ instead of 66€ for a tax at 10%.

@bm-services
Did you try to configure 2 specific prices (one for each country) or a specific price with tax excluded ?
It should solve your problem

This is not ideal because my customer sells in 22 countries that must be tax excluded and I have 3 specific prices per product, on more than 2000 products...
I preferred to fix changing my discount amounts to be tax excluded but I think that the with tax option should not be proposed or so we must review the calculations to avoid having the problem that I put here.

Was this page helpful?
0 / 5 - 0 ratings