File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,10 @@ function onShowEnd() {
8585 $ clients = $ app ->db ->queryAllRecords ($ sql );
8686 $ client_select = '' ;
8787 if ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' ) $ client_select .= "<option value='0'></option> " ;
88- $ tmp_data_record = $ app ->tform ->getDataRecord ($ this ->id );
88+ if ( $ this -> id > 0 ) $ tmp_data_record = $ app ->tform ->getDataRecord ($ this ->id ); else $ tmp_data_record = $ this -> dataRecord ;
8989 if (is_array ($ clients )) {
9090 foreach ( $ clients as $ client ) {
91- $ selected = ($ client ["groupid " ] == $ tmp_data_record ["sys_groupid " ])?'SELECTED ' :'' ;
91+ $ selected = ($ client ["groupid " ] == $ tmp_data_record ["sys_groupid " ] || $ client [ " groupid " ] == $ tmp_data_record [ " client_group_id " ] )?'SELECTED ' :'' ;
9292 $ client_select .= "<option value=' $ client [groupid]' $ selected> $ client [contactname]</option> \r\n" ;
9393 }
9494 }
You can’t perform that action at this time.
0 commit comments