[+] Project : adding Features detachables in order to improve performance

// clean code
This commit is contained in:
aFolletete
2011-09-03 17:21:32 +00:00
parent a4491c9897
commit 230bebc7c7
51 changed files with 1081 additions and 419 deletions
+2 -2
View File
@@ -118,9 +118,9 @@ class OrderSlipCore extends ObjectModel
$realProductPrice = $resTab[$key]['product_price'];
foreach ($discounts as $discount)
{
if ($discount['id_discount_type'] == 1)
if ($discount['id_discount_type'] == Discount::PERCENT)
$resTab[$key]['product_price'] -= $realProductPrice * ($discount['value'] / 100);
elseif ($discount['id_discount_type'] == 2)
elseif ($discount['id_discount_type'] == Discount::AMOUNT)
$resTab[$key]['product_price'] -= (($discount['value'] * ($product['product_price_wt'] / $order->total_products_wt)) / (1.00 + ($product['tax_rate'] / 100)));
}