FIX #33145 wrong label status buy on prodcut tooltip

This commit is contained in:
VESSILLER 2025-02-19 17:26:54 +01:00
parent 54df3c2991
commit 41e54529b0

View File

@ -5213,14 +5213,10 @@ 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'] .= ' - '.(!empty($line->label) ? $line->label : $line->product_label);