diff --git a/classes/stock/StockManager.php b/classes/stock/StockManager.php index f8bd21ae4..c9b86b8c1 100644 --- a/classes/stock/StockManager.php +++ b/classes/stock/StockManager.php @@ -562,7 +562,7 @@ class StockManagerCore implements StockManagerInterface // gets all stock_mvt for the given coverage period $query = ' - SELECT SUM(quantity) as quantity_out + SELECT SUM(view.quantity) as quantity_out FROM ( SELECT sm.`physical_quantity` as quantity FROM `'._DB_PREFIX_.'stock_mvt` sm @@ -576,7 +576,7 @@ class StockManagerCore implements StockManagerInterface AND s.`id_product_attribute` = '.(int)$id_product_attribute. ($id_warehouse ? ' AND s.`id_warehouse` = '.(int)$id_warehouse : '').' GROUP BY sm.`id_stock_mvt` - ) as sq'; + ) as view'; $quantity_out = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); if (!$quantity_out) diff --git a/controllers/admin/AdminStockCoverController.php b/controllers/admin/AdminStockCoverController.php index 01454b723..02466c0fd 100644 --- a/controllers/admin/AdminStockCoverController.php +++ b/controllers/admin/AdminStockCoverController.php @@ -64,16 +64,18 @@ class AdminStockCoverControllerCore extends AdminController 'filter_key' => 'b!name' ), 'coverage' => array( - 'title' => $this->l('Average time left'), - 'width' => 150, + 'title' => $this->l('Coverage'), + 'width' => 160, 'orderby' => false, - 'search' => false + 'search' => false, + 'hint' => $this->l('Days left before you run out of stock.') ), 'stock' => array( 'title' => $this->l('Quantity'), 'width' => 80, 'orderby' => false, - 'search' => false + 'search' => false, + 'hint' => $this->l('Physical (usable) quantity.') ), ); diff --git a/controllers/admin/AdminStockMvtController.php b/controllers/admin/AdminStockMvtController.php index f67a4591e..e4081947f 100644 --- a/controllers/admin/AdminStockMvtController.php +++ b/controllers/admin/AdminStockMvtController.php @@ -284,10 +284,6 @@ class AdminStockMvtControllerCore extends AdminController 'width' => 250, 'havingFilter' => true ), - 'id_order' => array( - 'title' => $this->l('Supply Order'), - 'width' => 40 - ), 'employee' => array( 'title' => $this->l('Employee'), 'width' => 100,