From fd032da4bc81da53e88529012bcbe6943ebcb9ab 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 --- 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; }