Do a strict comparison when check if stock is enough
This commit is contained in:
parent
ab4941a558
commit
e1de510c38
@ -355,7 +355,7 @@ class MouvementStock extends CommonObject
|
||||
$qtyisnotenough = 0;
|
||||
foreach ($product->stock_warehouse[$entrepot_id]->detail_batch as $batchcursor => $prodbatch)
|
||||
{
|
||||
if ($batch != $batchcursor) continue;
|
||||
if ($batch !== $batchcursor) continue; // Do a strict comparison because $batchcursar can be an integer
|
||||
$foundforbatch = 1;
|
||||
if ($prodbatch->qty < abs($qty)) $qtyisnotenough = $prodbatch->qty;
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user