FIX check on wrong variable, some unnecessary code removed

This commit is contained in:
jyhere 2023-04-13 16:55:00 +02:00 committed by GitHub
parent cc17467f3b
commit 5c54d5d279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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++;