// Stock : fixed/improved interfaces
This commit is contained in:
@@ -562,7 +562,7 @@ class StockManagerCore implements StockManagerInterface
|
|||||||
|
|
||||||
// gets all stock_mvt for the given coverage period
|
// gets all stock_mvt for the given coverage period
|
||||||
$query = '
|
$query = '
|
||||||
SELECT SUM(quantity) as quantity_out
|
SELECT SUM(view.quantity) as quantity_out
|
||||||
FROM
|
FROM
|
||||||
( SELECT sm.`physical_quantity` as quantity
|
( SELECT sm.`physical_quantity` as quantity
|
||||||
FROM `'._DB_PREFIX_.'stock_mvt` sm
|
FROM `'._DB_PREFIX_.'stock_mvt` sm
|
||||||
@@ -576,7 +576,7 @@ class StockManagerCore implements StockManagerInterface
|
|||||||
AND s.`id_product_attribute` = '.(int)$id_product_attribute.
|
AND s.`id_product_attribute` = '.(int)$id_product_attribute.
|
||||||
($id_warehouse ? ' AND s.`id_warehouse` = '.(int)$id_warehouse : '').'
|
($id_warehouse ? ' AND s.`id_warehouse` = '.(int)$id_warehouse : '').'
|
||||||
GROUP BY sm.`id_stock_mvt`
|
GROUP BY sm.`id_stock_mvt`
|
||||||
) as sq';
|
) as view';
|
||||||
|
|
||||||
$quantity_out = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
$quantity_out = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
||||||
if (!$quantity_out)
|
if (!$quantity_out)
|
||||||
|
|||||||
@@ -64,16 +64,18 @@ class AdminStockCoverControllerCore extends AdminController
|
|||||||
'filter_key' => 'b!name'
|
'filter_key' => 'b!name'
|
||||||
),
|
),
|
||||||
'coverage' => array(
|
'coverage' => array(
|
||||||
'title' => $this->l('Average time left'),
|
'title' => $this->l('Coverage'),
|
||||||
'width' => 150,
|
'width' => 160,
|
||||||
'orderby' => false,
|
'orderby' => false,
|
||||||
'search' => false
|
'search' => false,
|
||||||
|
'hint' => $this->l('Days left before you run out of stock.')
|
||||||
),
|
),
|
||||||
'stock' => array(
|
'stock' => array(
|
||||||
'title' => $this->l('Quantity'),
|
'title' => $this->l('Quantity'),
|
||||||
'width' => 80,
|
'width' => 80,
|
||||||
'orderby' => false,
|
'orderby' => false,
|
||||||
'search' => false
|
'search' => false,
|
||||||
|
'hint' => $this->l('Physical (usable) quantity.')
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -284,10 +284,6 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
'width' => 250,
|
'width' => 250,
|
||||||
'havingFilter' => true
|
'havingFilter' => true
|
||||||
),
|
),
|
||||||
'id_order' => array(
|
|
||||||
'title' => $this->l('Supply Order'),
|
|
||||||
'width' => 40
|
|
||||||
),
|
|
||||||
'employee' => array(
|
'employee' => array(
|
||||||
'title' => $this->l('Employee'),
|
'title' => $this->l('Employee'),
|
||||||
'width' => 100,
|
'width' => 100,
|
||||||
|
|||||||
Reference in New Issue
Block a user