From 544e857d3083b5ea2cf2b4a40da1e05129a8eb9f Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 27 Sep 2016 11:16:21 +0200
Subject: [PATCH] #4218 Show full client name in domain list.

---
 interface/web/client/list/domain.list.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/interface/web/client/list/domain.list.php b/interface/web/client/list/domain.list.php
index 82c6772155..c6f221c53c 100644
--- a/interface/web/client/list/domain.list.php
+++ b/interface/web/client/list/domain.list.php
@@ -92,7 +92,8 @@ $liste["item"][] = array( 'field'  => "sys_groupid",
 	'prefix' => "",
 	'suffix' => "",
 	'datasource' => array (  'type' => 'SQL',
-		'querystring' => 'SELECT a.groupid, a.name FROM sys_group a, domain b WHERE (a.groupid = b.sys_groupid) AND ({AUTHSQL-B}) ORDER BY name',
+		//'querystring' => 'SELECT a.groupid, a.name FROM sys_group a, domain b WHERE (a.groupid = b.sys_groupid) AND ({AUTHSQL-B}) ORDER BY name',
+		'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name",
 		'keyfield'=> 'groupid',
 		'valuefield'=> 'name'
 	),
-- 
GitLab