Merge pull request #14872 from FHenry/develop

fix remove php warning non-numeric value
This commit is contained in:
Laurent Destailleur 2020-10-01 19:18:11 +02:00 committed by GitHub
commit f79bce638a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -768,6 +768,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
} }
} }
$stockwarehouse=0;
if ($usevirtualstock) if ($usevirtualstock)
{ {
// If option to increase/decrease is not on an object validation, virtual stock may differs from physical stock. // If option to increase/decrease is not on an object validation, virtual stock may differs from physical stock.
@ -793,8 +794,8 @@ while ($i < ($limit ? min($num, $limit) : $num))
$desiredstock = $objp->desiredstock; $desiredstock = $objp->desiredstock;
$alertstock = $objp->seuil_stock_alerte; $alertstock = $objp->seuil_stock_alerte;
$desiredstockwarehouse = ($objp->desiredstockpse ? $objp->desiredstockpse : ''); $desiredstockwarehouse = ($objp->desiredstockpse ? $objp->desiredstockpse : 0);
$alertstockwarehouse = ($objp->seuil_stock_alertepse ? $objp->seuil_stock_alertepse : ''); $alertstockwarehouse = ($objp->seuil_stock_alertepse ? $objp->seuil_stock_alertepse : 0);
$warning = ''; $warning = '';
if ($alertstock && ($stock < $alertstock)) if ($alertstock && ($stock < $alertstock))