diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 71b076cea98c3..3e5a4e31f56d4 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -86,6 +86,10 @@ if ($count == 1 && (empty($fk_entrepot) || $fk_entrepot <= 0) && getDolGlobalString('MULTICOMPANY_PRODUCT_SHARING_ENABLED')) { $fk_entrepot = $lastWarehouseID; } +//If the warehouse is set to the default selected user +if ((empty($fk_entrepot) || $fk_entrepot <= 0) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE_USER')) { + $fk_entrepot = $user->fk_warehouse; +} $texte = '';