Fix test on qty for stock move

This commit is contained in:
Laurent Destailleur 2017-03-06 12:30:59 +01:00
parent 6e2aaf7408
commit f291e1c470

View File

@ -277,7 +277,7 @@ class MouvementStock extends CommonObject
// Check if stock is enough when qty is < 0
// Note that qty should be > 0 with type 0 or 3, < 0 with type 1 or 2.
if ($qty < 0 && empty($conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER))
if ($movestock && $qty < 0 && empty($conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER))
{
if (! empty($conf->productbatch->enabled) && $product->hasbatch() && ! $skip_batch)
{