[-] FO : #PSCFI-5795 : fixed a bug where the opc freeze when an Order is to 0

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16001 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aNiassy
2012-06-13 08:10:12 +00:00
parent 2239cfe7ae
commit 19d6ec53e4
2 changed files with 13 additions and 4 deletions
+4 -1
View File
@@ -303,7 +303,10 @@ class OrderDetailCore extends ObjectModel
if (count($this->tax_calculator->taxes) == 0)
return true;
if ($order->total_products <= 0)
return true;
$ratio = $this->unit_price_tax_excl / $order->total_products;
$order_reduction_amount = $order->total_discounts_tax_excl * $ratio;
$discounted_price_tax_excl = $this->unit_price_tax_excl - $order_reduction_amount;