tax report update, link to new line item report, per-agent tax reporting
[freeside.git] / httemplate / elements / select-agent.html
1 <%
2   my( $agentnum, %opt ) = @_;
3
4   my @agents;
5   if ( $opt{'agents'} ) {
6     @agents = @{ $opt{'agents'} };
7   } else {
8     @agents = qsearch( 'agent', { disabled=>'' } );
9   }
10
11 %>
12
13 <SELECT NAME="agentnum">
14
15   <OPTION VALUE="">all</OPTION>
16
17   <% foreach my $agent ( sort { $a->agent cmp $b->agent } @agents ) { %>
18
19     <OPTION VALUE="<%= $agent->agentnum %>"<%= $agentnum == $agent->agentnum ? ' SELECTED' : '' %>><%= $agent->agent %>
20
21   <% } %>
22
23 </SELECT>
24