-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Relates #3949 (but not the same!)
Relates #1387
Relates #2250
nopCommerce 4.80.8
Let's assume we have one store. The store is configured to show prices including taxes. Prices in the products are stored without tax and the settings are configured accordingly (and are correct this way).
Now let's also assume that you live in Germany and your local taxes are at 19%.
Given a product with a price of 4,10€ (net price). If you multiply 4,10€ * 1,19 you methematically get 4,879€ which the shop correctly rounds to 4,88€. Now let's assume that you are a customer and you buy 10 of these products. In the shopping cart you will see that the single unit price is 4,88€ and you would multiply that by ten, giving you a price for 10 of 48,80€. But that's not actually what's happening. The shop will display 48.79€ for a quantity of ten. If you do the same for a quantity of 100 this get's even worse. This is totally irritating for customers.
Let's get into some pseudo code. Here is the current implementation:
total = (price * quantity) * (1 + taxes / 100)
it should instead be:
total = Math.Round(price * (1 + taxes / 100), 2 /* two decimal places */) * quantity
With the second formula the customers would always see the correct price.
More or less the same thing also applies to the order totals and the taxes calculated for that.
Having this setup in a B2C Store is quite common, so this is a major problem for multiple of our customers. We did consider making this change ourselves, but it requires changes in many, many places and we are not sure if we can get to an acceptable solution without making core changes. That's why we are reporting this here.