Task 672 : only for product not services

This commit is contained in:
Maxime Kohlhaas
2014-03-15 12:47:01 +01:00
parent 9c340d7af8
commit b6a2fa61c8
2 changed files with 2 additions and 2 deletions

View File

@@ -1110,7 +1110,7 @@ class Commande extends CommonOrder
$result=$product->fetch($fk_product);
$product_type=$product->type;
if($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER && $product->stock_reel < $qty) {
if($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER && $product_type == 0 && $product->stock_reel < $qty) {
$this->error=$langs->trans('ErrorStockIsNotEnough');
$this->db->rollback();
return -3;