@@ -75,13 +75,13 @@ function onShowEnd() {
7575 $ app ->uses ('ini_parser,getconf ' );
7676 $ settings = $ app ->getconf ->get_global_config ('domains ' );
7777
78- if ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' && $ settings ['use_domain_module ' ] == 'y ' ) {
79- $ sql = "SELECT 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 = ? " ;
80- $ clients = $ app ->db ->queryAllRecords ($ sql , $ this ->dataRecord ['sys_groupid ' ]);
81- $ client_select = '<option value="dummy"> ' . $ clients [0 ]['contactname ' ]. '</option> ' ;
82- $ app ->tpl ->setVar ("client_group_name " , $ client_select );
83- }
84- elseif ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' && $ settings ['use_domain_module ' ] != 'y ' ) {
78+ if ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' && $ settings ['use_domain_module ' ] == 'y ' ) {
79+ $ sql = "SELECT 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.groupid = ? " ;
80+ $ clients = $ app ->db ->queryAllRecords ($ sql , $ this ->dataRecord ['sys_groupid ' ]);
81+ $ client_select = '<option value="dummy"> ' . $ clients [0 ]['contactname ' ] . '</option> ' ;
82+ $ app ->tpl ->setVar ("client_group_name " , $ client_select );
83+ }
84+ elseif ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' && $ settings ['use_domain_module ' ] != 'y ' ) {
8585 // Getting Clients of the user
8686 $ 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 " ;
8787
0 commit comments