// Improved StockInstantState / StockMvt

This commit is contained in:
bMancone
2011-12-27 16:25:34 +00:00
parent fcf3c461f8
commit 0e9472dd71
3 changed files with 16 additions and 7 deletions
@@ -202,6 +202,8 @@ class AdminStockInstantStateControllerCore extends AdminController
$query->select('SUM(price_te * physical_quantity) as valuation');
$query->from('stock');
$query->where('id_product = '.(int)$item['id_product'].' AND id_product_attribute = '.(int)$item['id_product_attribute']);
if ($this->getCurrentCoverageWarehouse() != -1)
$query->where('id_warehouse = '.(int)$this->getCurrentCoverageWarehouse());
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query);
$item['physical_quantity'] = $res['physical_quantity'];