[-] BO : Fix bug #PSCFV-7939 no quantity warning on orders when stock management not enable

This commit is contained in:
gRoussac
2013-03-04 15:07:03 +01:00
parent 3861f31ed4
commit 8bbd3aa615

View File

@@ -1297,7 +1297,7 @@ class AdminOrdersControllerCore extends AdminController
// display warning if there are products out of stock
$display_out_of_stock_warning = false;
$current_order_state = $order->getCurrentOrderState();
if (!Validate::isLoadedObject($current_order_state) || ($current_order_state->delivery != 1 && $current_order_state->shipped != 1))
if (configuration::get('PS_STOCK_MANAGEMENT') && (!Validate::isLoadedObject($current_order_state) || ($current_order_state->delivery != 1 && $current_order_state->shipped != 1)))
$display_out_of_stock_warning = true;
// products current stock (from stock_available)