[-] BO: fix PSCFV-3468 bad real quantity was displayed on Instant Stock Status
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16711 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -465,8 +465,6 @@ class StockManagerCore implements StockManagerInterface
|
||||
// casts for security reason
|
||||
$ids_warehouse = array_map('intval', $ids_warehouse);
|
||||
}
|
||||
else
|
||||
$ids_warehouse = array();
|
||||
|
||||
// Gets client_orders_qty
|
||||
$query = new DbQuery();
|
||||
@@ -494,7 +492,7 @@ class StockManagerCore implements StockManagerInterface
|
||||
$query->leftjoin('supply_order_state', 'sos', 'sos.id_supply_order_state = so.id_supply_order_state');
|
||||
$query->where('sos.pending_receipt = 1');
|
||||
$query->where('sod.id_product = '.(int)$id_product.' AND sod.id_product_attribute = '.(int)$id_product_attribute);
|
||||
if (count($ids_warehouse))
|
||||
if (!is_null($ids_warehouse) && count($ids_warehouse))
|
||||
$query->where('so.id_warehouse IN('.implode(', ', $ids_warehouse).')');
|
||||
|
||||
$supply_orders_qties = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||
|
||||
Reference in New Issue
Block a user