Merge pull request #13432 from atm-quentin/FIX_reapro_11

FIX replenish stock to buy
This commit is contained in:
Laurent Destailleur 2020-03-30 19:11:34 +02:00 committed by GitHub
commit 81b41c932f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -702,7 +702,10 @@ while ($i < ($limit ? min($num, $limit) : $num))
//depending on conf, use either physical stock or
//virtual stock to compute the stock to buy value
$stocktobuy = max(max($desiredstock, $alertstock) - $stock - $ordered, 0);
if(empty($usevirtualstock)) $stocktobuy = max(max($desiredstock, $alertstock) - $stock - $ordered, 0);
else $stocktobuy = max(max($desiredstock, $alertstock) - $stock, 0); //ordered is already in $stock in virtual mode
$disabled = '';
if ($ordered > 0)
{