1 % if ( scalar(@agents) == 1 ) {
3 <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'agentnum' %>" VALUE="<% $agents[0]->agentnum %>">
8 <TD ALIGN="right"><% $opt{'label'} || 'Agent' %></TD>
10 <% include( '/elements/select-agent.html',
11 'curr_value' => $agentnum,
24 my $agentnum = $opt{'curr_value'} || $opt{'value'};
27 if ( $opt{'agents'} ) {
28 #@agents = @{ $opt{'agents'} };
29 #here is the agent virtualization
30 my $agentnums_href = $FS::CurrentUser::CurrentUser->agentnums_href;
31 @agents = grep $agentnums_href->{$_->agentnum}, @{ $opt{'agents'} };
32 delete $opt{'agents'};
34 @agents = $FS::CurrentUser::CurrentUser->agents;