From b241af94a7914ad2cbb9839f268fa5350a779385 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 23 Mar 2023 11:06:20 +0100 Subject: [PATCH] NEW show supplier name in getNomUrl of supplier order --- htdocs/fourn/class/fournisseur.commande.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 1e3f74389d5..68a4193520a 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -874,6 +874,9 @@ class CommandeFournisseur extends CommonOrder $datas = []; if ($user->hasRight("fournisseur", "commande", "read")) { + if (!is_object($this->thirdparty)) { + $this->fetch_thirdparty(); + } $datas['picto'] = ''.$langs->trans("SupplierOrder").''; if (isset($this->statut)) { $datas['picto'] .= ' '.$this->getLibStatut(5); @@ -884,6 +887,9 @@ class CommandeFournisseur extends CommonOrder if (!empty($this->ref_supplier)) { $datas['refsupplier'] = '
'.$langs->trans('RefSupplier').': '.$this->ref_supplier; } + if (!empty($this->thirdparty->name)) { + $datas['suppliername'] = '
'.$langs->trans('Supplier').': '.$this->thirdparty->name; + } if (!empty($this->total_ht)) { $datas['totalht'] = '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); }