2 % my( $agentnum, %opt ) = @_;
5 % if ( $opt{'agents'} ) {
6 % #@agents = @{ $opt{'agents'} };
7 % #here is the agent virtualization
8 % my $agentnums_href = $FS::CurrentUser::CurrentUser->agentnums_href;
9 % @agents = grep $agentnums_href->{$_->agentnum}, @{ $opt{'agents'} };
10 % delete $opt{'agents'};
12 % @agents = $FS::CurrentUser::CurrentUser->agents;
16 % if ( scalar(@agents) == 1 ) {
19 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agents[0]->agentnum %>">
24 <TD ALIGN="right"><% $opt{'label'} || 'Agent' %></TD>
26 <% include( '/elements/select-agent.html', $agentnum,