This commit is contained in:
lvessiller-opendsi 2025-02-20 07:22:07 +00:00 committed by GitHub
commit f0fbe61331
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5213,16 +5213,12 @@ abstract class CommonObject
$discount->fk_soc = $this->socid;
$this->tpl['label'] .= $discount->getNomUrl(0, 'discount');
} elseif (!empty($line->fk_product)) {
$productstatic = new Product($this->db);
$productstatic->id = $line->fk_product;
$productstatic->ref = $line->ref;
$productstatic->type = $line->fk_product_type;
if (empty($productstatic->ref)) {
if (empty($line->product)) {
$line->fetch_product();
$productstatic = $line->product;
}
$productstatic = $line->product;
$this->tpl['label'] .= $productstatic->getNomUrl(1);
$this->tpl['label'] .= (is_object($productstatic) ? $productstatic->getNomUrl(1) : $line->ref);
$this->tpl['label'] .= ' - '.(!empty($line->label) ? $line->label : $line->product_label);
// Dates
if ($line->product_type == 1 && ($date_start || $date_end)) {