Merge pull request #22542 from marc-dll/14.0_FIX_update_buyprice_error_reporting

FIX: supplier price update: missing error reporting
This commit is contained in:
Laurent Destailleur 2022-10-13 00:37:57 +02:00 committed by GitHub
commit 467a97c0e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -419,7 +419,11 @@ class ProductFournisseur extends Product
$productfournisseurprice->array_options[$key] = $value;
}
$res = $productfournisseurprice->update($user);
if ($res < 0) $error++;
if ($res < 0) {
$this->error = $productfournisseurprice->error;
$this->errors = $productfournisseurprice->errors;
$error++;
}
}
}
}
@ -506,6 +510,7 @@ class ProductFournisseur extends Product
if ($resql) {
$this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX."product_fournisseur_price");
} else {
$this->error = $this->db->lasterror();
$error++;
}
@ -518,7 +523,11 @@ class ProductFournisseur extends Product
$productfournisseurprice->array_options[$key] = $value;
}
$res = $productfournisseurprice->update($user);
if ($res < 0) $error++;
if ($res < 0) {
$this->error = $productfournisseurprice->error;
$this->errors = $productfournisseurprice->errors;
$error++;
}
}
}
}