Add thirdparty (supplier) line to FactureFournisseur and SupplierProposal tooltips (#39570)
CommandeFournisseur::getTooltipContentArray() already adds a "Supplier" line (thirdparty getNomUrl) to the getNomUrl tooltip, but FactureFournisseur and SupplierProposal do not. Hovering a supplier invoice or supplier proposal link therefore never shows which thirdparty it belongs to, an inconsistency between three otherwise-similar objects. Align both with CommandeFournisseur: add the same $datas['supplier'] entry, right after RefSupplier, honoring the 'nofetch' param. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
950628b540
commit
0dd56d89a2
2 changed files with 20 additions and 0 deletions
|
|
@ -17,6 +17,7 @@
|
|||
* Copyright (C) 2023 Nick Fragoulis
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2026 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
* Copyright (C) 2026 Jose Martinez <jose.martinez@pichinov.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -2869,6 +2870,15 @@ class FactureFournisseur extends CommonInvoice
|
|||
if (!empty($this->ref_supplier)) {
|
||||
$datas['refsupplier'] = '<br><b>'.$langs->trans('RefSupplier').':</b> '.$this->ref_supplier;
|
||||
}
|
||||
if (empty($params['nofetch'])) {
|
||||
$langs->load('companies');
|
||||
if (empty($this->thirdparty)) {
|
||||
$this->fetch_thirdparty();
|
||||
}
|
||||
if (is_object($this->thirdparty)) {
|
||||
$datas['supplier'] = '<br><b>'.$langs->trans('Supplier').':</b> '.$this->thirdparty->getNomUrl(1, '', 0, 1);
|
||||
}
|
||||
}
|
||||
if (!empty($this->label)) {
|
||||
$datas['label'] = '<br><b>'.$langs->trans('Label').':</b> '.$this->label;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2026 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
* Copyright (C) 2026 Lionel Vessiller <lvessiller@open-dsi.fr>
|
||||
* Copyright (C) 2026 Jose Martinez <jose.martinez@pichinov.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -2547,6 +2548,15 @@ class SupplierProposal extends CommonObject
|
|||
if (!empty($this->ref_fourn)) {
|
||||
$datas['ref_supplier'] = '<br><b>'.$langs->trans('RefSupplier').':</b> '.$this->ref_fourn;
|
||||
}
|
||||
if (empty($params['nofetch'])) {
|
||||
$langs->load('companies');
|
||||
if (empty($this->thirdparty)) {
|
||||
$this->fetch_thirdparty();
|
||||
}
|
||||
if (is_object($this->thirdparty)) {
|
||||
$datas['supplier'] = '<br><b>'.$langs->trans('Supplier').':</b> '.$this->thirdparty->getNomUrl(1, '', 0, 1);
|
||||
}
|
||||
}
|
||||
if (!empty($this->total_ht)) {
|
||||
$datas['amount_ht'] = '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1, getDolCurrency());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue