Merge pull request #29141 from defrance/patch-327

php error warning
This commit is contained in:
Laurent Destailleur 2024-03-30 19:52:08 +01:00 committed by GitHub
commit d66061ba87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -845,7 +845,9 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
}
} else {
$stock = $prod->stock_reel;
$stockwarehouse = $prod->stock_warehouse[$fk_entrepot]->real;
if (getDolGlobalString('STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE') && $fk_entrepot > 0) {
$stockwarehouse = $prod->stock_warehouse[$fk_entrepot]->real;
}
}
// Force call prod->load_stats_xxx to choose status to count (otherwise it is loaded by load_stock function)