@@ -82,7 +82,7 @@ function onShowEnd() {
8282 // If user is admin, we will allow him to select to whom this record belongs
8383 if ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' ) {
8484 // Getting Domains of the user
85- $ sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name " ;
85+ $ sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name " ;
8686 $ clients = $ app ->db ->queryAllRecords ($ sql );
8787 $ client_select = '' ;
8888 if ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' ) $ client_select .= "<option value='0'></option> " ;
@@ -101,7 +101,7 @@ function onShowEnd() {
101101 $ client = $ app ->db ->queryOneRecord ("SELECT client.client_id, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $ client_group_id " );
102102
103103 // Fill the client select field
104- $ sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = " .$ client ['client_id ' ]." ORDER BY sys_group.name " ;
104+ $ sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = " .$ client ['client_id ' ]." ORDER BY client.company_name, client.contact_name, sys_group.name " ;
105105 $ clients = $ app ->db ->queryAllRecords ($ sql );
106106 $ tmp = $ app ->db ->queryOneRecord ("SELECT groupid FROM sys_group WHERE client_id = " .$ client ['client_id ' ]);
107107 $ client_select = '<option value=" ' .$ tmp ['groupid ' ].'"> ' .$ client ['contactname ' ].'</option> ' ;
0 commit comments