Update replenish.php

php error warning
This commit is contained in:
Charlène Benke 2024-03-30 19:11:29 +01:00 committed by GitHub
parent 3d28163c2e
commit 6a6873ff73
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)