diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 6a6fe72a08a..39adc8cd598 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -871,7 +871,7 @@ class Productcustomerprice extends CommonObject $prodsocpriceupd->recuperableonly = $this->recuperableonly; $resultupd = $prodsocpriceupd->update($user, 0, $forceupdateaffiliate); - if ($result < 0) { + if ($resultupd < 0) { $error++; $this->error = $prodsocpriceupd->error; } @@ -889,7 +889,7 @@ class Productcustomerprice extends CommonObject $prodsocpricenew->recuperableonly = $this->recuperableonly; $resultupd = $prodsocpricenew->create($user, 0, $forceupdateaffiliate); - if ($result < 0) { + if ($resultupd < 0) { $error++; $this->error = $prodsocpricenew->error; } @@ -923,7 +923,7 @@ class Productcustomerprice extends CommonObject $this->db->begin(); - if (!$error && !$notrigger) { + if (!$notrigger) { $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_DELETE', $user); if ($result < 0) { $error++;