// Fixed StockCover

// Removed id_stock_mvt_reason from StockManager::transferBetweenWarehouses()
// It is now allowed to transfer stock within one warehouse if and only if it only changes, for a given quantity, its usable state


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9586 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2011-10-24 12:58:24 +00:00
parent db39d6a2d2
commit d5a56e3b27
4 changed files with 8 additions and 9 deletions
@@ -146,9 +146,10 @@ class AdminStockCoverControllerCore extends AdminController
$this->_select = 'a.id_product as id, COUNT(pa.id_product_attribute) as variations, s.physical_quantity as stock';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.id_product = a.id_product)
LEFT JOIN `'._DB_PREFIX_.'stock` s ON (s.id_product = a.id_product AND s.id_product_attribute = 0)';
INNER JOIN `'._DB_PREFIX_.'stock` s ON (s.id_product = a.id_product)';
$this->where = 'AND s.id_product_attribute = 0';
if ($this->getCurrentCoverageWarehouse() != -1)
$this->_where = 'AND s.id_warehouse = '.$this->getCurrentCoverageWarehouse();
$this->_where .= 'AND s.id_warehouse = '.$this->getCurrentCoverageWarehouse();
$this->context->smarty->assign('stock_cover_periods', $this->stock_cover_periods);
$this->context->smarty->assign('stock_cover_cur_period', $this->getCurrentCoveragePeriod());