mailalerts
mailalerts copied to clipboard
Fix rounding error in new order email
The previous values are rounded to 2 decimals in the following method:
- Order::getOrders()
- Order::getProductsDetail()
- Order::setProductPrices()
This is due to backwards compatibility with 1.4, but it can lead to rounding errors in the product lines in the email. Instead, here we are using other values provided by the Core.
See example screenshot, where the total is not aligned with the product total:
Please note how the total in the product line is not the same as the product total below. The minus-minus on the coupon line is another issue, precisely: https://github.com/PrestaShop/mailalerts/pull/25
:up:
Anybody?