Merge pull request #17599 from fbagnol/develop

Add soc in categories contacts list
This commit is contained in:
Laurent Destailleur 2021-05-17 09:54:26 +02:00 committed by GitHub
commit 6217d83846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -754,6 +754,7 @@ if ($type == Categorie::TYPE_CONTACT) {
$num = count($contacts);
$nbtotalofrecords = '';
$newcardbutton = '';
$objsoc = new Societe($db);
print_barre_liste($langs->trans("Contact"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contact', 0, $newcardbutton, '', $limit);
print '<table class="noborder centpercent">'."\n";
@ -770,6 +771,11 @@ if ($type == Categorie::TYPE_CONTACT) {
print "\t".'<tr class="oddeven">'."\n";
print '<td class="nowrap" valign="top">';
print $contact->getNomUrl(1, 'category');
if ($contact->socid > 0) {
$objsoc->fetch($contact->socid);
print ' - ';
print $objsoc->getNomUrl(1, 'contact');
}
print "</td>\n";
// Link to delete from category
print '<td class="right">';