[-] Core: Fix StockManager::getProductRealQuantities() per warehouse with some orderstatuses #PSCFV-9219
This commit is contained in:
@@ -479,8 +479,8 @@ class StockManagerCore implements StockManagerInterface
|
|||||||
$query->where('o.valid = 1 OR (os.id_order_state != '.(int)Configuration::get('PS_OS_ERROR').'
|
$query->where('o.valid = 1 OR (os.id_order_state != '.(int)Configuration::get('PS_OS_ERROR').'
|
||||||
AND os.id_order_state != '.(int)Configuration::get('PS_OS_CANCELED').')');
|
AND os.id_order_state != '.(int)Configuration::get('PS_OS_CANCELED').')');
|
||||||
$query->groupBy('od.id_order_detail');
|
$query->groupBy('od.id_order_detail');
|
||||||
//if (count($ids_warehouse))
|
if (count($ids_warehouse))
|
||||||
//$query->where('od.id_warehouse IN('.implode(', ', $ids_warehouse).')');
|
$query->where('od.id_warehouse IN('.implode(', ', $ids_warehouse).')');
|
||||||
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||||
$client_orders_qty = 0;
|
$client_orders_qty = 0;
|
||||||
if (count($res))
|
if (count($res))
|
||||||
@@ -658,4 +658,4 @@ class StockManagerCore implements StockManagerInterface
|
|||||||
return $stocks;
|
return $stocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user