From 8d035f5ec28cb31fbc7dfb5b87e301df9374d532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bagnol?= Date: Thu, 13 May 2021 00:40:56 +0200 Subject: [PATCH 1/3] Add soc in categories contacts list --- htdocs/categories/viewcat.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 817c750a571..d1f15d4997c 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -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 ''."\n"; @@ -767,9 +768,15 @@ if ($type == Categorie::TYPE_CONTACT) { break; } + $objsoc->fetch($contact->socid); + print "\t".''."\n"; print '\n"; // Link to delete from category print ''."\n"; print ''."\n"; print '
'; print $contact->getNomUrl(1, 'category'); + if ($objsoc->id > 0) { + print ' - '; + print $objsoc->getNomUrl(1, 'contact'); + } print "'; From 79b51baa3de47e9f4dd633dd6a05811d21fd8b5e Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 12 May 2021 22:46:09 +0000 Subject: [PATCH 2/3] Fixing style errors. --- htdocs/categories/viewcat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index d1f15d4997c..b62bc3bcb0f 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -769,7 +769,7 @@ if ($type == Categorie::TYPE_CONTACT) { } $objsoc->fetch($contact->socid); - + print "\t".'
'; print $contact->getNomUrl(1, 'category'); From f95f0748e3acca203bb92faafc44c8207580f4ca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 May 2021 09:54:04 +0200 Subject: [PATCH 3/3] Update viewcat.php --- htdocs/categories/viewcat.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index b62bc3bcb0f..eeca990ef28 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -768,12 +768,11 @@ if ($type == Categorie::TYPE_CONTACT) { break; } - $objsoc->fetch($contact->socid); - print "\t".'
'; print $contact->getNomUrl(1, 'category'); - if ($objsoc->id > 0) { + if ($contact->socid > 0) { + $objsoc->fetch($contact->socid); print ' - '; print $objsoc->getNomUrl(1, 'contact'); }