Merge pull request #24503 from jyhere/jyhere-patch-8

FIX check on wrong variable, some unnecessary code removed
This commit is contained in:
Laurent Destailleur 2023-04-18 21:01:05 +02:00 committed by GitHub
commit ca23849119
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -875,7 +875,7 @@ class Productcustomerprice extends CommonObject
$prodsocpriceupd->recuperableonly = $this->recuperableonly; $prodsocpriceupd->recuperableonly = $this->recuperableonly;
$resultupd = $prodsocpriceupd->update($user, 0, $forceupdateaffiliate); $resultupd = $prodsocpriceupd->update($user, 0, $forceupdateaffiliate);
if ($result < 0) { if ($resultupd < 0) {
$error++; $error++;
$this->error = $prodsocpriceupd->error; $this->error = $prodsocpriceupd->error;
} }
@ -893,7 +893,7 @@ class Productcustomerprice extends CommonObject
$prodsocpricenew->recuperableonly = $this->recuperableonly; $prodsocpricenew->recuperableonly = $this->recuperableonly;
$resultupd = $prodsocpricenew->create($user, 0, $forceupdateaffiliate); $resultupd = $prodsocpricenew->create($user, 0, $forceupdateaffiliate);
if ($result < 0) { if ($resultupd < 0) {
$error++; $error++;
$this->error = $prodsocpricenew->error; $this->error = $prodsocpricenew->error;
} }
@ -927,7 +927,7 @@ class Productcustomerprice extends CommonObject
$this->db->begin(); $this->db->begin();
if (!$error && !$notrigger) { if (!$notrigger) {
$result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_DELETE', $user); $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_DELETE', $user);
if ($result < 0) { if ($result < 0) {
$error++; $error++;