Fix: Avoid errors when batch stock is negative
This commit is contained in:
parent
01f2180822
commit
ede4453164
@ -882,7 +882,7 @@ if ($action == 'create')
|
|||||||
if ($defaultqty<=0) {
|
if ($defaultqty<=0) {
|
||||||
$defaultqty=0;
|
$defaultqty=0;
|
||||||
} else {
|
} else {
|
||||||
$defaultqty -= min($defaultqty,$substock);
|
$defaultqty -= ($substock > 0 ? min($defaultqty,$substock) : 0);
|
||||||
}
|
}
|
||||||
$subj++;
|
$subj++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user