NKoonen / vatchecker

[Prestashop]Checks if customer has a valid VAT number, and then puts the customer a specific group.
https://customs-documents.com
BSD 3-Clause "New" or "Revised" License
34 stars 15 forks source link

Products on discount - incorrect calculation netto price #42

Closed futurowebpl closed 8 months ago

futurowebpl commented 9 months ago

We noticed an error in the operation of the module - when converting the VAT rate, it does not take into account the price after the discount, but calculates it from the base price (before the discount).

The correct conversion should look like this: Price after discount - 1587 Lei VAT rate - 19% Price excluding VAT - 1,333.61 Lei

The module calculates as follows: Price before discount - 1987 Lei VAT rate - 19% Price before discount excluding VAT - 1669.75 Lei

from this amount, the module subtracts the gross value of the discount - 400 Lei Net price calculated by the module - 1269.75 Lei Therefore, the net price is lower by 63.86 Lei

NKoonen commented 9 months ago

The module disables the tax rule for customers with 0% vat. It could depend on wether your discount is with or without tax.

So could you share with me how / where you have set the discount?

futurowebpl commented 8 months ago

obraz

futurowebpl commented 8 months ago

Okay,

If in this field we enter netto price - everythings works good,

so - I close this task.