Fix stock decrement of lot qty on delivery

This commit is contained in:
fappels 2016-09-26 17:31:55 +02:00
parent b50d92e712
commit acbd00286c

View File

@ -535,7 +535,9 @@ class MouvementStock extends CommonObject
*/
function livraison($user, $fk_product, $entrepot_id, $qty, $price=0, $label='', $datem='', $eatby='', $sellby='', $batch='', $id_product_batch=0)
{
$skip_batch = empty($conf->productbatch->enabled);
global $conf;
$skip_batch = empty($conf->productbatch->enabled);
return $this->_create($user, $fk_product, $entrepot_id, (0 - $qty), 2, $price, $label, '', $datem, $eatby, $sellby, $batch, $skip_batch, $id_product_batch);
}