From c97bac9160d6ce4e9def59abbec67eaf41c75f37 Mon Sep 17 00:00:00 2001 From: rMalie Date: Mon, 12 Dec 2011 18:08:09 +0000 Subject: [PATCH] // Remove useless code in OrderHistory git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11154 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/order/OrderHistory.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php index c48368886..5511cfa0d 100644 --- a/classes/order/OrderHistory.php +++ b/classes/order/OrderHistory.php @@ -89,10 +89,9 @@ class OrderHistoryCore extends ObjectModel if ($newOS->logable AND (!$oldOrderStatus OR !$oldOrderStatus->logable)) { ProductSale::addProductSale($product['id_product'], $product['cart_quantity']); - } /* If becoming unlogable => removing sale */ - elseif (!$newOS->logable AND ($oldOrderStatus AND $oldOrderStatus->logable)) + else if (!$newOS->logable AND ($oldOrderStatus AND $oldOrderStatus->logable)) { ProductSale::removeProductSale($product['id_product'], $product['cart_quantity']); // @since 1.5.0 @@ -123,9 +122,6 @@ class OrderHistoryCore extends ObjectModel else if ($newOS->shipped == 0 && $oldOrderStatus->shipped == 1 && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) { $manager = StockManagerFactory::getManager(); - $warehouse = new Warehouse($id_warehouse); - $depends = - $mvts = StockMvt::getNegativeStockMvts($order->id, $product['id_product'], $product['id_product_attribute'], $product['cart_quantity']); foreach ($mvts as $mvt) {