fix remove php warning non-numeric value

This commit is contained in:
Florian HENRY 2020-09-30 13:53:27 +02:00
parent f063a144c1
commit 6b539dfad0

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))