dynamic selector print improved, now using ref instead of id

This commit is contained in:
Dorian Vabre 2021-04-15 12:57:19 +02:00
parent 764d984ebf
commit 12a796fd8e

View File

@ -351,6 +351,14 @@ if ($action == 'edit') {
} elseif ($conf->global->{$constname}==0) {
print $langs->trans("NorProspectNorCustomer");
}
} elseif ($val['type'] == 'product') {
$product = new Product($db);
$resprod = $product->fetch($conf->global->{$constname});
if ($resprod > 0) {
print $product->ref;
} elseif ($resprod < 0) {
setEventMessages(null, $object->errors, "errors");
}
} else {
print $conf->global->{$constname};
}