mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
FIX for #22882
This commit is contained in:
@@ -269,10 +269,14 @@ if (empty($reshook)) {
|
||||
if ($ret == -3) {
|
||||
$error++;
|
||||
|
||||
$object->fetch($object->product_id_already_linked);
|
||||
$productLink = $object->getNomUrl(1, 'supplier');
|
||||
$tmpobject = new Product($db);
|
||||
$tmpobject->fetch($object->product_id_already_linked);
|
||||
$productLink = $tmpobject->getNomUrl(1, 'supplier');
|
||||
|
||||
setEventMessages($langs->trans("ReferenceSupplierIsAlreadyAssociatedWithAProduct", $productLink), null, 'errors');
|
||||
$texttoshow = $langs->trans("ReferenceSupplierIsAlreadyAssociatedWithAProduct", '{s1}');
|
||||
$texttoshow = str_replace('{s1}', $productLink, $texttoshow);
|
||||
setEventMessages($texttoshow, null, 'errors');
|
||||
|
||||
} elseif ($ret < 0) {
|
||||
$error++;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
||||
Reference in New Issue
Block a user