Reputation: 37
I'm having issue with calculation of price without tax, when I put price without discount it counts okay, because I made some changes in presta core, for example if I put product with price of 4,5 tax incl and 8% tax I get price - 4,17 tax excl, and that is correct.
(4,5*100)/108 = 4,16666 rounds up.
After giving specific price -15% I get price tax incl 3,83 which is correct, but I get 3,54 price tax excl which is incorrect (correct should be 3,55), I assume that everything counts using price tax excl instead of incl and counts like this
4,17 - (4,17*0,15) = 3,5445 (which php rounds to 3,54 instead of 3,55),
Do you have any idea in which controller or source file should I look to modify PrestaShop behaviour?
Upvotes: 0
Views: 563
Reputation: 1612
Inside "Product" class, check the static method getPriceStatic that is basically handling everything related to retrieving a product price.
You'll end to explore Product::priceCalculation and many methods on the SpecificPrice class that are related to calculation of discounts.
Upvotes: 1