Fix link on invoice

This commit is contained in:
Laurent Destailleur 2019-06-07 22:47:15 +02:00
parent 2ecde139f0
commit 49646663a1
2 changed files with 8 additions and 4 deletions

View File

@ -1203,7 +1203,7 @@ class Facture extends CommonInvoice
*/ */
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1, $target = '') public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1, $target = '')
{ {
global $langs, $conf, $user, $form; global $langs, $conf, $user;
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
@ -1225,7 +1225,7 @@ class Facture extends CommonInvoice
if ($short) return $url; if ($short) return $url;
$picto='bill'; $picto=$this->picto;
if ($this->type == self::TYPE_REPLACEMENT) $picto.='r'; // Replacement invoice if ($this->type == self::TYPE_REPLACEMENT) $picto.='r'; // Replacement invoice
if ($this->type == self::TYPE_CREDIT_NOTE) $picto.='a'; // Credit note if ($this->type == self::TYPE_CREDIT_NOTE) $picto.='a'; // Credit note
if ($this->type == self::TYPE_DEPOSIT) $picto.='d'; // Deposit invoice if ($this->type == self::TYPE_DEPOSIT) $picto.='d'; // Deposit invoice
@ -1241,6 +1241,8 @@ class Facture extends CommonInvoice
$label .= '<br><b>'.$langs->trans('Ref') . ':</b> ' . $this->ref; $label .= '<br><b>'.$langs->trans('Ref') . ':</b> ' . $this->ref;
if (! empty($this->ref_client)) if (! empty($this->ref_client))
$label .= '<br><b>' . $langs->trans('RefCustomer') . ':</b> ' . $this->ref_client; $label .= '<br><b>' . $langs->trans('RefCustomer') . ':</b> ' . $this->ref_client;
if (! empty($this->date))
$label .= '<br><b>' . $langs->trans('Date') . ':</b> ' . dol_print_date($this->date, 'day');
if (! empty($this->total_ht)) if (! empty($this->total_ht))
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); $label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_tva)) if (! empty($this->total_tva))

View File

@ -2269,7 +2269,7 @@ class FactureFournisseur extends CommonInvoice
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
} }
$picto='bill'; $picto=$this->picto;
if ($this->type == self::TYPE_REPLACEMENT) $picto.='r'; // Replacement invoice if ($this->type == self::TYPE_REPLACEMENT) $picto.='r'; // Replacement invoice
if ($this->type == self::TYPE_CREDIT_NOTE) $picto.='a'; // Credit note if ($this->type == self::TYPE_CREDIT_NOTE) $picto.='a'; // Credit note
if ($this->type == self::TYPE_DEPOSIT) $picto.='d'; // Deposit invoice if ($this->type == self::TYPE_DEPOSIT) $picto.='d'; // Deposit invoice
@ -2281,6 +2281,8 @@ class FactureFournisseur extends CommonInvoice
$label.= '<br><b>' . $langs->trans('RefSupplier') . ':</b> ' . $this->ref_supplier; $label.= '<br><b>' . $langs->trans('RefSupplier') . ':</b> ' . $this->ref_supplier;
if (! empty($this->libelle)) if (! empty($this->libelle))
$label.= '<br><b>' . $langs->trans('Label') . ':</b> ' . $this->libelle; $label.= '<br><b>' . $langs->trans('Label') . ':</b> ' . $this->libelle;
if (! empty($this->date))
$label .= '<br><b>' . $langs->trans('Date') . ':</b> ' . dol_print_date($this->date, 'day');
if (! empty($this->total_ht)) if (! empty($this->total_ht))
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); $label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_tva)) if (! empty($this->total_tva))
@ -2312,7 +2314,7 @@ class FactureFournisseur extends CommonInvoice
$linkend='</a>'; $linkend='</a>';
$result .= $linkstart; $result .= $linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); if ($withpicto) $result.=img_object(($notooltip?'':$label), $picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.= ($max?dol_trunc($ref, $max):$ref); if ($withpicto != 2) $result.= ($max?dol_trunc($ref, $max):$ref);
$result .= $linkend; $result .= $linkend;