Merge branch 'ticket-fidelite' into develop

This commit is contained in:
Marion Muszynski 2016-04-22 16:43:35 +02:00
commit 82882a9b5b

View File

@ -520,7 +520,6 @@ class Loyalty extends Module
if ($id_loyalty) {
$loyalty = new LoyaltyModule((int)$id_loyalty);
$loyalty->discount_value = LoyaltyModule::getDiscountValueByPrice($totalPrice);
echo "<pre>";var_dump('hookorderreturn',$loyalty->discount_value);echo "</pre>";die();
if ($loyalty->discount_value<=0) {
$loyalty->id_loyalty_state = (int)LoyaltyStateModule::getCancelId();
}
@ -680,7 +679,7 @@ class Loyalty extends Module
return false;
}
$price = (number_format($orderDetail->product_price * (1 + $orderDetail->tax_rate / 100), 2, '.', '') * ($orderDetail->product_quantity - $orderDetail->product_quantity_refunded));
$price = ($params['order']->total_paid - $params['order']->total_shipping) - (number_format($orderDetail->product_price * (1 + $orderDetail->tax_rate / 100), 2, '.', '') * ($orderDetail->product_quantity - $orderDetail->product_quantity_refunded));
if ($price>0) {
$loyalty->discount_value = LoyaltyModule::getDiscountValueByPrice($price);
} else {