Missing picto property

This commit is contained in:
Laurent Destailleur 2020-09-14 04:11:12 +02:00
parent b20be7074e
commit 814f07d316

View File

@ -59,6 +59,11 @@ class Livraison extends CommonObject
*/
public $table_element_line = "livraisondet";
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'sending';
public $brouillon;
public $socid;
public $ref_customer;
@ -716,7 +721,6 @@ class Livraison extends CommonObject
global $langs;
$result = '';
$picto = 'sending';
$label = img_picto('', $this->picto).' <u>'.$langs->trans("ShowReceiving").'</u>:<br>';
$label .= '<b>'.$langs->trans("Status").'</b>: '.$this->ref;
@ -735,7 +739,7 @@ class Livraison extends CommonObject
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$linkend = '</a>';
if ($withpicto) $result .= ($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend);
if ($withpicto) $result .= ($linkstart.img_object($label, $this->picto, 'class="classfortooltip"').$linkend);
if ($withpicto && $withpicto != 2) $result .= ' ';
$result .= $linkstart.$this->ref.$linkend;
return $result;