PrestaShop/PrestaShop — pull request #1960 by axometeam (2014-07-09 14:18:11+00:00)
Title: [-] FO: toFixed() causes price calculation error

Variable "priceWithDiscountsDisplay" comes with a precision of 3 as the variable "basePriceDisplay" comes with a precision of 2. It results in a comparison error as the Number.toFixed() method rounds value to the superior decimal (ie: 1.116 becomes 1.12 but 1.114 returns 1.11). In our case, a discount price is then displayed (which is wrong) as the converted value is higher than the real price.