// Fixed rounding bug on cart rules

This commit is contained in:
dMetzger
2011-12-15 10:41:00 +00:00
parent 24693c0ebb
commit fd032da4bc
+2 -2
View File
@@ -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;
}