From 6c7337d2cb7f584db2a8c3228489e39d76b9bdf0 Mon Sep 17 00:00:00 2001 From: dMetzger Date: Thu, 15 Dec 2011 10:41:00 +0000 Subject: [PATCH] // Fixed rounding bug on cart rules git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11245 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Cart.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Cart.php b/classes/Cart.php index 977c320a3..e070e8c6a 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -1293,9 +1293,9 @@ class CartCore extends ObjectModel { $result = $this->getCartRules(); foreach ($result as $row) - $order_total_discount += Tools::ps_round($row['obj']->getContextualValue($with_taxes)); + $order_total_discount += Tools::ps_round($row['obj']->getContextualValue($with_taxes), 2); - $order_total_discount = min(Tools::ps_round($order_total_discount), $wrapping_fees + $order_total_products + $shipping_fees); + $order_total_discount = min(Tools::ps_round($order_total_discount, 2), $wrapping_fees + $order_total_products + $shipping_fees); $order_total -= $order_total_discount; }