add a domain pulldown to svc_acct linking, closes: Bug#277 / prevent "stealing" servi...
[freeside.git] / httemplate / browse / agent.cgi
index ece0172..2eef5bb 100755 (executable)
@@ -55,7 +55,7 @@ full offerings (via their type).<BR><BR>
 
 <%= table() %>
 <TR>
-  <TH COLSPAN=<%= $cgi->param('showdisabled') ? 2 : 3 %>>Agent</TH>
+  <TH COLSPAN=<%= ( $cgi->param('showdisabled') || !dbdef->table('agent')->column('disabled') ) ? 2 : 3 %>>Agent</TH>
   <TH>Type</TH>
   <TH>Customers</TH>
   <TH><FONT SIZE=-1>Freq.</FONT></TH>
@@ -78,6 +78,9 @@ foreach my $agent ( sort {
 
   my $num_cancelled = $num_total - $num_ncancelled;
 
+  my $cust_main_link = $p. 'search/cust_main.cgi?agentnum_on=1&'.
+                       'agentnum='. $agent->agentnum;
+
 %>
 
       <TR>
@@ -93,9 +96,9 @@ foreach my $agent ( sort {
         <TD><A HREF="<%=$p%>edit/agent_type.cgi?<%= $agent->typenum %>"><%= $agent->agent_type->atype %></A></TD>
         <TD>
           <FONT COLOR="#00CC00"><B><%= $num_ncancelled %></B></FONT>
-            active
+            <A HREF="<%= $cust_main_link %>&showcancelledcustomers=0">active</A>
           <BR><FONT COLOR="#FF0000"><B><%= $num_cancelled %></B></FONT>
-            cancelled
+            <A HREF="<%= $cust_main_link %>&showcancelledcustomers=1&cancelled=1">cancelled</A>
         </TD>
         <TD><%= $agent->freq %></TD>
         <TD><%= $agent->prog %></TD>