Update LoyaltyModule.php

Voucher should be without taxes, otherwise points would be negative.
This commit is contained in:
cedricfontaine
2013-10-07 12:07:03 -04:00
parent f78a093a1c
commit 717e195f57

View File

@@ -116,7 +116,11 @@ class LoyaltyModule extends ObjectModel
$total += ($taxesEnabled == PS_TAX_EXC ? $product['price'] : $product['price_wt'])* (int)($product['cart_quantity']);
}
foreach ($cart->getCartRules(false) AS $cart_rule)
$total -= $cart_rule['value_real'];
if ($taxesEnabled == PS_TAX_EXC)
$total -= $cart_rule['value_tax_exc'];
else
$total -= $cart_rule['value_real'];
}
return self::getNbPointsByPrice($total);