Add soc in categories contacts list

This commit is contained in:
Frédéric Bagnol 2021-05-13 00:40:56 +02:00 committed by GitHub
parent 5917a9f73e
commit 8d035f5ec2
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";
@ -767,9 +768,15 @@ if ($type == Categorie::TYPE_CONTACT) {
break;
}
$objsoc->fetch($contact->socid);
print "\t".'<tr class="oddeven">'."\n";
print '<td class="nowrap" valign="top">';
print $contact->getNomUrl(1, 'category');
if ($objsoc->id > 0) {
print ' - ';
print $objsoc->getNomUrl(1, 'contact');
}
print "</td>\n";
// Link to delete from category
print '<td class="right">';