%
% my $hashref = $opt{'hashref'} || {};
%
-% my $extra_sql = '';
+% my $extra_sql = $opt{'extra_sql'} || '';
%
% if ( $opt{'agent_virt'} ) {
% $extra_sql .= ' AND' . $FS::CurrentUser::CurrentUser->agentnums_sql(
% ? 'CHECKED'
% : '';
%
+% } elsif ( !$sourcenum ) { # newly created object, has no links yet
+%
+% $checked = $opt{'default'} ? 'CHECKED' : ''
+%
% } else {
%
% $checked = qsearchs( $opt{'link_table'}, {