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) {
|
||||
$defaultqty=0;
|
||||
} else {
|
||||
$defaultqty -= min($defaultqty,$substock);
|
||||
$defaultqty -= ($substock > 0 ? min($defaultqty,$substock) : 0);
|
||||
}
|
||||
$subj++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user