[-] BO : fix #PSCFV-3087

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16261 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-07-06 12:55:48 +00:00
parent 49ab58a185
commit ddbd363946
+4 -2
View File
@@ -715,6 +715,8 @@ class AdminOrdersControllerCore extends AdminController
$total += $order->total_shipping;
$cartrule->reduction_amount = $total;
$cartrule->minimum_amount_currency = $order->id_currency;
$cartrule->reduction_currency = $order->id_currency;
if (!$cartrule->add())
$this->errors[] = Tools::displayError('Cannot generate voucher');
@@ -722,8 +724,8 @@ class AdminOrdersControllerCore extends AdminController
{
// Update the voucher code and name
foreach ($languages as $language)
$cartrule->name[$language['id_lang']] = 'V'.(int)($voucher->id).'C'.(int)($order->id_customer).'O'.$order->id;
$cartrule->code = 'V'.(int)($voucher->id).'C'.(int)($order->id_customer).'O'.$order->id;
$cartrule->name[$language['id_lang']] = 'V'.(int)($cartrule->id).'C'.(int)($order->id_customer).'O'.$order->id;
$cartrule->code = 'V'.(int)($cartrule->id).'C'.(int)($order->id_customer).'O'.$order->id;
if (!$cartrule->update())
$this->errors[] = Tools::displayError('Cannot generate voucher');
else