Merge pull request #22544 from inovea-conseil/FIX_available_warehouse

FIX closed warehouse for shipping
This commit is contained in:
Laurent Destailleur 2022-10-18 00:59:06 +02:00 committed by GitHub
commit d7d6d0486b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2334,7 +2334,7 @@ if ($resql) {
// Get local and virtual stock and store it into cache
if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product])) {
$generic_product->load_stock('nobatch'); // ->load_virtual_stock() is already included into load_stock()
$generic_product->load_stock('nobatch,warehouseopen'); // ->load_virtual_stock() is already included into load_stock()
$productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_reel;
$productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique;
} else {