From c09d09b86901f9808fad397f5fd5587f625b6a4b Mon Sep 17 00:00:00 2001 From: fappels Date: Sun, 20 Nov 2016 22:30:40 +0100 Subject: [PATCH] Remove hasbatch test Intention is to remove all data linked to product_stock, which will be deleted. --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 (";