From b007685e740b7357dd408ae9e0bd4bd686a6c9a7 Mon Sep 17 00:00:00 2001 From: aFolletete Date: Tue, 3 Jan 2012 16:50:06 +0000 Subject: [PATCH] [-] BO : fixed bug on product line edition in order page --- controllers/admin/AdminOrdersController.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index c050b1293..c340f5cbc 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -1523,6 +1523,16 @@ class AdminOrdersControllerCore extends AdminController // Get the last product $product = $products[$order_detail->id]; + // Get invoices collection + $invoice_collection = $order->getInvoicesCollection(); + + $invoice_array = array(); + foreach($invoice_collection as $invoice) + { + $invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id); + $invoice_array[] = $invoice; + } + // Assign to smarty informations in order to show the new product line $this->context->smarty->assign(array( 'product' => $product, @@ -1535,16 +1545,6 @@ class AdminOrdersControllerCore extends AdminController 'current_index' => self::$currentIndex )); - // Get invoices collection - $invoice_collection = $order->getInvoicesCollection(); - - $invoice_array = array(); - foreach($invoice_collection as $invoice) - { - $invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id); - $invoice_array[] = $invoice; - } - if (!$res) die(Tools::jsonEncode(array( 'result' => $res,