From 9180ded3e1785771708949a723c2454ea0cc7d6e Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Fri, 12 May 2017 11:12:07 +0200 Subject: [PATCH 1/2] continuing refunding part --- .../AdminAntReturnprocess.php | 120 ++++++++++++++++-- 1 file changed, 108 insertions(+), 12 deletions(-) diff --git a/modules/ant_returnprocess/AdminAntReturnprocess.php b/modules/ant_returnprocess/AdminAntReturnprocess.php index 3d2201d2..b578633c 100644 --- a/modules/ant_returnprocess/AdminAntReturnprocess.php +++ b/modules/ant_returnprocess/AdminAntReturnprocess.php @@ -52,7 +52,7 @@ class AdminAntReturnprocess extends AdminTab Mail::Send((int)$order->id_lang, 'order_return_state', Mail::l('Your order return state has changed', (int)$order->id_lang), $vars, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, NULL, NULL, _PS_MAIL_DIR_, true); - Tools::redirectAdmin($currentIndex.'&id_order_return='.(int)$id_order_return.'&updateorder_return&conf=4&token='.$this->token); + Tools::redirectAdmin($currentIndex.'&id_order_return='.(int)$id_order_return.'&updateorder_return&ok=2&token='.$this->token); } } else { HelperFormBootstrap::displayErrors(Tools::displayError('No order return ID.')); @@ -104,7 +104,7 @@ class AdminAntReturnprocess extends AdminTab $ct->update(); $cm->update(); } - Tools::redirectAdmin($currentIndex.'&id_order_return='.(int)$id_order_return.'&updateorder_return&conf=4&token='.$this->token); + Tools::redirectAdmin($currentIndex.'&id_order_return='.(int)$id_order_return.'&updateorder_return&ok=3&token='.$this->token); } else { HelperFormBootstrap::displayErrors(Tools::displayError('An error occurred, your message was not sent. Please contact your system administrator.')); } @@ -154,10 +154,48 @@ class AdminAntReturnprocess extends AdminTab $customer->email, $customer->firstname.' '.$customer->lastname ); - Tools::redirectAdmin($currentIndex.'&id_order_return='.(int)$id_order_return.'&updateorder_return&conf=4&token='.$this->token); + Tools::redirectAdmin($currentIndex.'&id_order_return='.(int)$id_order_return.'&updateorder_return&ok=4&token='.$this->token); } else { HelperFormBootstrap::displayErrors(Tools::displayError('Order ID missing.')); } + } elseif (Tools::isSubmit('submitOrderState') && Tools::getValue('id_order_return') && ($id_order = (int)(Tools::getValue('id_order'))) AND Validate::isLoadedObject($order = new Order($id_order))) { + + $id_order_return = (int) Tools::getValue('id_order_return'); + if (!$newOrderStatusId = (int)(Tools::getValue('id_order_state'))) { + HelperFormBootstrap::displayErrors(Tools::displayError('Invalid new order status')); + } else { + $history = new OrderHistory(); + $history->id_order = (int)$id_order; + $history->id_employee = (int)($cookie->id_employee); + $history->changeIdOrderState((int)($newOrderStatusId), (int)($id_order)); + $order = new Order((int)$order->id); + $carrier = new Carrier((int)($order->id_carrier), (int)($order->id_lang)); + + $templateVars = array(); + if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') AND $order->shipping_number) { + $templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url)); + } elseif ($history->id_order_state == Configuration::get('PS_OS_CHEQUE')) { + $templateVars = array( + '{cheque_name}' => (Configuration::get('CHEQUE_NAME') ? Configuration::get('CHEQUE_NAME') : ''), + '{cheque_address_html}' => (Configuration::get('CHEQUE_ADDRESS') ? nl2br(Configuration::get('CHEQUE_ADDRESS')) : '')); + } elseif ($history->id_order_state == Configuration::get('PS_OS_BANKWIRE')) { + $templateVars = array( + '{bankwire_owner}' => (Configuration::get('BANK_WIRE_OWNER') ? Configuration::get('BANK_WIRE_OWNER') : ''), + '{bankwire_details}' => (Configuration::get('BANK_WIRE_DETAILS') ? nl2br(Configuration::get('BANK_WIRE_DETAILS')) : ''), + '{bankwire_address}' => (Configuration::get('BANK_WIRE_ADDRESS') ? nl2br(Configuration::get('BANK_WIRE_ADDRESS')) : '')); + } + + if (Tools::getValue('noSendMail')) { + if ($history->add()) { + Tools::redirectAdmin($currentIndex.'&id_order_return='.(int)$id_order_return.'&updateorder_return&ok=5&token='.$this->token); + } + } else { + if ($history->addWithemail(true, $templateVars)) { + Tools::redirectAdmin($currentIndex.'&id_order_return='.(int)$id_order_return.'&updateorder_return&ok=5&token='.$this->token); + } + } + HelperFormBootstrap::displayErrors(Tools::displayError('An error occurred while changing the status or was unable to send e-mail to the customer.')); + } } } @@ -189,14 +227,31 @@ class AdminAntReturnprocess extends AdminTab } } - if (isset($_GET['updateorder_return'])) - { + if (isset($_GET['updateorder_return'])) { + if(isset($_GET['ok'])){ + switch ($_GET['ok']) { + case '2': + $success_mess = 'Mise à jour enregistrée'; + break; + case '3': + $success_mess = 'Votre message a bien été envoyé'; + break; + case '4': + $success_mess = 'Les instructions on été renvoyées'; + break; + case '5': + $success_mess = 'Le nouveau statut de le commande a bien été enregistré'; + break; + default: + $success_mess = 'Mise à jour enregistrée'; + break; + } + HelperFormBootstrap::displaySuccess($success_mess); + } $this->displayForm(); echo '

'.$this->l('Back to list').'
'; - } - else - { + } else { $this->displaylist(); } } @@ -216,7 +271,7 @@ class AdminAntReturnprocess extends AdminTab $customer = new Customer((int)$order->id_customer); $data = $this->getOrderDetail($cart,(int)$cart->id_lang,$order); $currency = new Currency((int)(Configuration::get('PS_CURRENCY_DEFAULT'))); - $currentState = OrderHistory::getLastOrderState((int)$orderReturn->id_order); + $orderStates = OrderState::getOrderStates((int)($cookie->id_lang)); $shipping_numbers = Db::getInstance()->ExecuteS(' SELECT DISTINCT lpws.`shipping_number`, lpws.`date_add` FROM `'._DB_PREFIX_.'lapostews` lpws @@ -472,9 +527,9 @@ class AdminAntReturnprocess extends AdminTab '.$this->l('Prix U').' '.$this->l('Qté').' '.($order->hasBeenPaid() ?''.$this->l('Remb').'':'').' - '.($order->hasBeenDelivered() ?''.$this->l('Retour').'':'').' '.$this->l('Stock').' '.$this->l('Total').' + '.($order->module ? ($order->module=="paybox"?' ':' ') : '').' '; @@ -500,7 +555,7 @@ class AdminAntReturnprocess extends AdminTab - '.$product['product_name'].'
+ '.$product['product_name'].'
'.($product['product_reference'] ? ''.$this->l('Ref:').' '.$product['product_reference'].'
' : '') .($product['product_supplier_reference'] ? ''.$this->l('Ref Supplier:').' '.$product['product_supplier_reference'].'' : '') .'
@@ -508,9 +563,10 @@ class AdminAntReturnprocess extends AdminTab '.Tools::displayPrice($product_price,$currency).' '.$quantity.' '.($order->hasBeenPaid() ? ''.(int)($product['product_quantity_refunded']).'' : '').' - '.($order->hasBeenDelivered() ? ''.(int)($product['product_quantity_return']).'' : '').' '.(int)$stock['quantity'].' '.Tools::displayPrice(Tools::ps_round($product_price, 2) * ((int)($product['product_quantity']) - $product['customizationQuantityTotal']), $currency, false).' + + '; } } @@ -518,6 +574,46 @@ class AdminAntReturnprocess extends AdminTab +
+
+
+
+
'.$this->l('Changer le statut de la commande').'
+
+
+ +
+
+ +
+ + + +
+
+ +
From ddd066a662a3719faeec456dafcac87646c02f42 Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Fri, 12 May 2017 14:57:13 +0200 Subject: [PATCH 2/2] continuing with refund part --- .../AdminAntReturnprocess.php | 425 +++++++++++++++--- 1 file changed, 370 insertions(+), 55 deletions(-) diff --git a/modules/ant_returnprocess/AdminAntReturnprocess.php b/modules/ant_returnprocess/AdminAntReturnprocess.php index b578633c..b6409c2e 100644 --- a/modules/ant_returnprocess/AdminAntReturnprocess.php +++ b/modules/ant_returnprocess/AdminAntReturnprocess.php @@ -196,6 +196,294 @@ class AdminAntReturnprocess extends AdminTab } HelperFormBootstrap::displayErrors(Tools::displayError('An error occurred while changing the status or was unable to send e-mail to the customer.')); } + } elseif(Tools::isSubmit('submitCancelProduct') && Tools::getValue('id_order_return') && ($id_order = (int)(Tools::getValue('id_order'))) AND Validate::isLoadedObject($order = new Order($id_order))) { + $_POST['generateCreditSlip'] = 1; + $customer = new Customer($order->id_customer); + + $productList = Tools::getValue('cancelQuantity'); + $id_order_details = array(); + $refund_quantities = array(); + foreach ($productList as $id_order_detail => $qty) { + if((int)$qty ==0) { + unset($productList[$id_order_detail]); + } + $id_order_details[$id_order_detail] = $id_order_detail; + $refund_quantities[$id_order_detail] = $qty; + } + $errors = 0; + + $id_cart = Cart::getCartIdByOrderId($order->id); + foreach ($productList AS $id_order_detail => $qty) + { + $qtyCancelProduct = abs($qty); + if (!$qtyCancelProduct) { + HelperFormBootstrap::displayErrors(Tools::displayError('No quantity selected for product.')); + $errors++; + } + + // check actionable quantity + $order_detail = new OrderDetail($id_order_detail); + $customization_quantity = 0; + if (array_key_exists($order_detail->product_id, $customization_quantities) && array_key_exists($order_detail->product_attribute_id, $customization_quantities[$order_detail->product_id])) { + $customization_quantity = (int) $customization_quantities[$order_detail->product_id][$order_detail->product_attribute_id]; + } + + if (($order_detail->product_quantity - $customization_quantity - $order_detail->product_quantity_refunded - $order_detail->product_quantity_return) < $qtyCancelProduct) { + HelperFormBootstrap::displayErrors(Tools::displayError('Invalid quantity selected for product.')); + $errors++; + } + } + if ($errors == 0 AND $productList) { + foreach ($productList AS $id_order_detail => $qty) { + $qtyCancelProduct = abs($qty); + $orderDetail = new OrderDetail((int)($id_order_detail)); + + //@Addition Antadis - prevent reinjection when the product is sent by Philea + $is_philea = DB::getInstance()->getValue(' + SELECT p.`id_sale` + FROM `'._DB_PREFIX_.'philea_sync` p + LEFT JOIN `'._DB_PREFIX_.'product_ps_cache` ps ON (ps.`id_sale` = p.`id_sale`) + WHERE ps.`id_product`='.$orderDetail->product_id + ); + // @Addition Antadis - prevent reinjection when the product is in Braderie + $is_braderie = (int)DB::getInstance()->getValue(' + SELECT p.`braderie` + FROM `'._DB_PREFIX_.'privatesale` p + LEFT JOIN `'._DB_PREFIX_.'product_ps_cache` ps ON (ps.`id_sale` = p.`id_sale`) + WHERE ps.`id_product`='.$orderDetail->product_id + ); + // $is_philea = false; // dev + // $is_braderie = false; // dev + // Reinject product + if ( + !$order->hasBeenDelivered() + OR ($order->hasBeenDelivered() AND Tools::isSubmit('reinjectQuantities') AND !$is_philea AND !$is_braderie) + ){ + if( + (($is_philea || $is_braderie) && !$order->hasBeenShipped() && !$order->hasBeenDelivered()) + || (!$is_philea && !$is_braderie) + ){ + $reinjectableQuantity = (int)($orderDetail->product_quantity) - (int)($orderDetail->product_quantity_reinjected); + $quantityToReinject = $qtyCancelProduct > $reinjectableQuantity ? $reinjectableQuantity : $qtyCancelProduct; + + if (!Product::reinjectQuantities($orderDetail, $quantityToReinject)) { + $errors++; + HelperFormBootstrap::displayErrors(Tools::displayError('Cannot re-stock product').' '.$orderDetail->product_name.''); + } + else + { + $updProductAttributeID = !empty($orderDetail->product_attribute_id) ? (int)($orderDetail->product_attribute_id) : NULL; + $newProductQty = Product::getQuantity((int)($orderDetail->product_id), $updProductAttributeID); + $product = get_object_vars(new Product((int)($orderDetail->product_id), false, (int)($cookie->id_lang))); + if (!empty($orderDetail->product_attribute_id)) + { + $updProduct['quantity_attribute'] = (int)($newProductQty); + $product['quantity_attribute'] = $updProduct['quantity_attribute']; + } + else + { + $updProduct['stock_quantity'] = (int)($newProductQty); + $product['stock_quantity'] = $updProduct['stock_quantity']; + } + Hook::updateQuantity($product, $order); + } + } + } + + // Delete product + if (!$order->deleteProduct($order, $orderDetail, $qtyCancelProduct)) { + $errors++; + HelperFormBootstrap::displayErrors(Tools::displayError('An error occurred during deletion of the product.').' '.$orderDetail->product_name.''); + } + Module::hookExec('cancelProduct', array('order' => $order, 'id_order_detail' => $id_order_detail)); + } + + $params['{lastname}'] = $customer->lastname; + $params['{firstname}'] = $customer->firstname; + $params['{id_order}'] = $order->id; + + /* PRODUIT REMBOURSE */ + $products_refund = ""; + $total_refund = 0; + foreach ($productList as $id_order_detail => $qty) { + $details_refund = new OrderDetail($id_order_detail); + + $tprice = $details_refund->product_price * (1 - $details_refund->reduction_percent / 100) - $details_refund->reduction_amount; + $tprice = $tprice * ( 1+ $details_refund->tax_rate / 100 ); + + $products_refund .= " + + ". $details_refund->product_name . " + " . Tools::displayPrice($tprice) . " + ". (int)$qty ." + " . Tools::displayPrice(($tprice * (int)$qty)) . " + + "; + $total_refund = $total_refund + ($tprice * (int)$qty); + } + + $params['{products}'] = $products_refund; + $params['{total_products}'] = Tools::displayPrice($total_refund); + + $fraisport = ""; + if(isset($_POST['shippingBack'])) + { + $order = new Order($details_refund->id_order); + Module::hookExec('cancelShipping', array('order' => $order)); + $fraisport .= " + + Frais de port + " . Tools::displayPrice($order->total_shipping) . " + + "; + } + $params['{fraisport}'] = $fraisport; + + if (isset($_POST['generateCreditSlip']) AND $errors==0) + { + if (!OrderSlip::createOrderSlip($order, $full_product_list, $full_quantity_list, isset($_POST['shippingBack']))) { + HelperFormBootstrap::displayErrors(Tools::displayError('Cannot generate credit slip')); + $errors++; + } else { + Module::hookExec('orderSlip', array('order' => $order, 'productList' => $id_order_details, 'qtyList' => $refund_quantities)); + + @Mail::Send((int)$order->id_lang, 'credit_slip', Mail::l('New credit slip regarding your order', $order->id_lang), + $params, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, NULL, NULL, + _PS_MAIL_DIR_, true); + } + } + + // update order state if it's partial + if($order->getCurrentState() == 17) { + $partial = true; + + $to_send = Db::getInstance()->ExecuteS(' + SELECT `id_order_detail`, (`product_quantity` - IF(`product_quantity_return` > 0, `product_quantity_return`, `product_quantity_refunded`)) AS `quantity`, `product_id` + FROM `'._DB_PREFIX_.'order_detail` + WHERE `id_order` = '.(int) $order->id.' + AND (`product_quantity` - IF(`product_quantity_return` > 0, `product_quantity_return`, `product_quantity_refunded`)) > 0 + '); + + if(count($to_send) == 0) { + $partial = false; + } else { + include_once dirname(__FILE__).'/../../modules/privatesales/Sale.php'; + $quantities_sent = array(); + + $product_ids = array(); + foreach(Db::getInstance()->ExecuteS(' + SELECT `product_id` + FROM `'._DB_PREFIX_.'order_detail` + WHERE `id_order` = '.(int) $order->id.' + ') as $row) { + $product_ids[] = (int) $row['product_id']; + } + + /** + * @Override Philea + */ + if(Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'philea_parcel` + WHERE `id_order` = '.(int) $order->id.' + ')) { + foreach(Db::getInstance()->ExecuteS(' + SELECT c.`id_product` + FROM `'._DB_PREFIX_.'product_ps_cache` c + WHERE c.`id_product` IN ('.implode(', ', $products_ids).') + ') as $row) { + $quantities_sent[(int) $row['id_product']] = -1; + } + } + + $parcel_quantities = array(); + foreach($to_send as $ts) { + if(!isset($quantities_sent[(int) $ts['product_id']])) { + $parcel_quantities[(int) $ts['id_order_detail']] = $ts; + } + } + + if(count($parcel_quantities) > 0) { + $partial = false; + $sent_logistics = array(); + + foreach(Db::getInstance()->ExecuteS(' + SELECT SUM(`quantity`) AS `quantity`, `id_order_detail` + FROM `'._DB_PREFIX_.'lapostews` + WHERE `id_order_detail` IN ('.implode(', ', array_keys($parcel_quantities)).') + GROUP BY `id_order_detail` + ') as $row) { + $sent_logistics[(int) $row['id_order_detail']] = (int) $row['quantity']; + } + + foreach(Db::getInstance()->ExecuteS(' + SELECT SUM(`quantity`) AS `quantity`, `id_order_detail` + FROM `'._DB_PREFIX_.'mondialrelay_parcel` + WHERE `id_order_detail` IN ('.implode(', ', array_keys($parcel_quantities)).') + GROUP BY `id_order_detail` + ') as $row) { + $sent_logistics[(int) $row['id_order_detail']] = (int) $row['quantity']; + } + + foreach(Db::getInstance()->ExecuteS(' + SELECT SUM(`quantity`) AS `quantity`, `id_order_detail` + FROM `'._DB_PREFIX_.'exapaqws` + WHERE `id_order_detail` IN ('.implode(', ', array_keys($parcel_quantities)).') + GROUP BY `id_order_detail` + ') as $row) { + $sent_logistics[(int) $row['id_order_detail']] = (int) $row['quantity']; + } + + if(count($sent_logistics) == 0) { + $partial = true; + } else { + foreach($parcel_quantities as $k => $v) { + if(!isset($sent_logistics[(int) $k])) { + $partial = true; + break; + } else { + if($sent_logistics[(int) $k] < $v['quantity']) { + $partial = true; + break; + } + } + } + } + } else { + $partial = false; + } + + if(!$partial) { + global $cookie; + Db::getInstance()->ExecuteS(' + INSERT INTO `'._DB_PREFIX_.'order_history` + VALUES ( + DEFAULT, + '.(int) $cookie->id_employee.', + '.(int) $order->id.', + '.Configuration::get('PS_OS_SHIPPING').', + NOW() + ) + '); + Db::getInstance()->ExecuteS(' + INSERT INTO `'._DB_PREFIX_.'order_state_current` + VALUES ( + '.(int) $order->id.', + '.Configuration::get('PS_OS_SHIPPING').', + NOW() + ) + ON DUPLICATE KEY UPDATE + `id_order_state` = '.Configuration::get('PS_OS_SHIPPING').', + `date_upd` = NOW() + '); + $newOS = new OrderState((int)(Configuration::get('PS_OS_SHIPPING')), $order->id_lang); + Module::hookExec('updateOrderStatus', array('newOrderStatus' => $newOS, 'id_order' => (int)($order->id))); + } + } + } + HelperFormBootstrap::displaySuccess('Remboursement Effectué'); + } + } } @@ -303,6 +591,7 @@ class AdminAntReturnprocess extends AdminTab ); } + $tokenCatalog = Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)($cookie->id_employee)); $returnProducts = OrderReturn::getOrdersReturnProducts($orderReturn->id, $order); $orderReturnState = new OrderReturnState($orderReturn->state); @@ -389,7 +678,7 @@ class AdminAntReturnprocess extends AdminTab
-
+ '.($orderReturn->id ? '' : '').' @@ -519,67 +808,93 @@ class AdminAntReturnprocess extends AdminTab
-
- - - - - - - '.($order->hasBeenPaid() ?'':'').' - - - - - - '; - foreach ($order->getProducts() as $key => $product) { - if ($order->getTaxCalculationMethod() == PS_TAX_EXC) { - $product_price = $product['product_price'] + $product['ecotax']; - } else { - $product_price = $product['product_price_wt']; - } - - if ($product['product_quantity'] > $product['customizationQuantityTotal']) - { - $quantity = $product['product_quantity'] - $product['customizationQuantityTotal']; - $stock = Db::getInstance()->getRow(' - SELECT '.($product['product_attribute_id'] ? 'pa' : 'p').'.quantity - FROM '._DB_PREFIX_.'product p - '.($product['product_attribute_id'] ? 'LEFT JOIN '._DB_PREFIX_.'product_attribute pa ON p.id_product = pa.id_product' : '').' - WHERE p.id_product = '.(int)($product['product_id']).' - '.($product['product_attribute_id'] ? 'AND pa.id_product_attribute = '.(int)($product['product_attribute_id']) : '') - ); - - $html .=' + +
+
'.$this->l('Produit').''.$this->l('Prix U').''.$this->l('Qté').''.$this->l('Remb').''.$this->l('Stock').''.$this->l('Total').''.($order->module ? ($order->module=="paybox"?' ':' ') : '').'
+ - - - - '.($order->hasBeenPaid() ? '' : '').' - - - - '; + + + + '.($order->hasBeenPaid() ?'':'').' + + + + + + '; + foreach ($order->getProducts() as $key => $product) { + if ($order->getTaxCalculationMethod() == PS_TAX_EXC) { + $product_price = $product['product_price'] + $product['ecotax']; + } else { + $product_price = $product['product_price_wt']; + } + + if ($product['product_quantity'] > $product['customizationQuantityTotal']) + { + $quantity = $product['product_quantity'] - $product['customizationQuantityTotal']; + $stock = Db::getInstance()->getRow(' + SELECT '.($product['product_attribute_id'] ? 'pa' : 'p').'.quantity + FROM '._DB_PREFIX_.'product p + '.($product['product_attribute_id'] ? 'LEFT JOIN '._DB_PREFIX_.'product_attribute pa ON p.id_product = pa.id_product' : '').' + WHERE p.id_product = '.(int)($product['product_id']).' + '.($product['product_attribute_id'] ? 'AND pa.id_product_attribute = '.(int)($product['product_attribute_id']) : '') + ); + + $html .=' + + + + + '.($order->hasBeenPaid() ? '' : '').' + + + + '; + } } - } - $html .= ' -
- - '.$product['product_name'].'
- '.($product['product_reference'] ? ''.$this->l('Ref:').' '.$product['product_reference'].'
' : '') - .($product['product_supplier_reference'] ? ''.$this->l('Ref Supplier:').' '.$product['product_supplier_reference'].'' : '') - .'
-
'.Tools::displayPrice($product_price,$currency).''.$quantity.''.(int)($product['product_quantity_refunded']).''.(int)$stock['quantity'].''.Tools::displayPrice(Tools::ps_round($product_price, 2) * ((int)($product['product_quantity']) - $product['customizationQuantityTotal']), $currency, false).' -
'.$this->l('Produit').''.$this->l('Prix U').''.$this->l('Qté').''.$this->l('Remb').'*'.$this->l('Stock').''.$this->l('Total').''.($order->module ? ($order->module=="paybox"?' ':' ') : '').'
+ + '.$product['product_name'].'
+ '.($product['product_reference'] ? ''.$this->l('Ref:').' '.$product['product_reference'].'
' : '') + .($product['product_supplier_reference'] ? ''.$this->l('Ref Supplier:').' '.$product['product_supplier_reference'].'' : '') + .'
+
'.Tools::displayPrice($product_price,$currency).''.$quantity.''.(int)($product['product_quantity_refunded']).' | '.(int)($product['product_quantity_return']).''.(int)$stock['quantity'].''.Tools::displayPrice(Tools::ps_round($product_price, 2) * ((int)($product['product_quantity']) - $product['customizationQuantityTotal']), $currency, false).' + = (int)($product['product_quantity'])) ? 'disabled="disabled" ' : '').'/> +
-
+ $html .= ' + +

* Le chiffre de gauche correspond à la quantité remboursée pré-envoi et celui de droite post-envoi

+
+ +
+
+ + + +
+
+
'.$this->l('Changer le statut de la commande').'
-
+
-