diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 078c9f0ef7c..59bef696171 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -926,7 +926,7 @@ class Product extends CommonObject } // Delete from product_batch on product delete - if (! $error && $this->hasbatch()) + if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.'product_batch'; $sql.= " WHERE fk_product_stock IN (";