Fix label of company of a thirdparty

This commit is contained in:
Laurent Destailleur 2021-08-30 18:38:31 +02:00
parent 74ad0586a9
commit 9c3ba22b02

View File

@ -919,9 +919,13 @@ while ($i < min($num, $limit)) {
if (!empty($obj->fk_soc)) { if (!empty($obj->fk_soc)) {
$memberstatic->fetch_thirdparty(); $memberstatic->fetch_thirdparty();
if ($memberstatic->thirdparty->id > 0) {
$companyname = $memberstatic->thirdparty->name; $companyname = $memberstatic->thirdparty->name;
$companynametoshow = $memberstatic->thirdparty->getNomUrl(1);
}
} else { } else {
$companyname = $obj->company; $companyname = $obj->company;
$companynametoshow = $obj->company;
} }
$memberstatic->company = $companyname; $memberstatic->company = $companyname;
@ -984,7 +988,7 @@ while ($i < min($num, $limit)) {
// Company // Company
if (!empty($arrayfields['d.company']['checked'])) { if (!empty($arrayfields['d.company']['checked'])) {
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companyname).'">'; print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companyname).'">';
print $companyname; print $companynametoshow;
print "</td>\n"; print "</td>\n";
} }
// Login // Login