Skip to content
Snippets Groups Projects
Commit ede44531 authored by fmarcet's avatar fmarcet
Browse files

Fix: Avoid errors when batch stock is negative

parent 01f21808
No related branches found
No related tags found
No related merge requests found
......@@ -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++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment