diff options
author | ivan <ivan> | 2005-08-07 00:40:02 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-08-07 00:40:02 +0000 |
commit | 6ed5d51b3a72e2935dd5d084c9e24567150b03ca (patch) | |
tree | 25626f44e2179b5b1fa704d672153345ae404380 /httemplate/browse/agent.cgi | |
parent | 05d94720d26ca009b06f21534b06d1650d9f2915 (diff) |
move cust_pkg search to new template, add active/suspended/cancelled customer packages to agent browse
Diffstat (limited to 'httemplate/browse/agent.cgi')
-rwxr-xr-x | httemplate/browse/agent.cgi | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi index c5c992704..fd360ab3c 100755 --- a/httemplate/browse/agent.cgi +++ b/httemplate/browse/agent.cgi @@ -32,6 +32,7 @@ full offerings (via their type).<BR><BR> <TH COLSPAN=<%= ( $cgi->param('showdisabled') || !dbdef->table('agent')->column('disabled') ) ? 2 : 3 %>>Agent</TH> <TH>Type</TH> <TH>Customers</TH> + <TH><FONT SIZE=-1>Customer<BR>packages</FONT></TH> <TH>Reports</TH> <TH>Registration codes</TH> <TH>Prepaid cards</TH> @@ -50,6 +51,8 @@ foreach my $agent ( sort { my $cust_main_link = $p. 'search/cust_main.cgi?agentnum_on=1&'. 'agentnum='. $agent->agentnum; + my $cust_pkg_link = $p. 'search/cust_pkg.cgi?agentnum='. $agent->agentnum; + %> <TR> @@ -65,7 +68,6 @@ foreach my $agent ( sort { <TD><A HREF="<%=$p%>edit/agent_type.cgi?<%= $agent->typenum %>"><%= $agent->agent_type->atype %></A></TD> <TD> - <TABLE CELLSPACING=0 CELLPADDING=0> <TR> <TH ALIGN="right" WIDTH="40%"> @@ -113,6 +115,44 @@ foreach my $agent ( sort { </TD> <TD> + <TABLE CELLSPACING=0 CELLPADDING=0> + <TR> + <TH ALIGN="right" WIDTH="40%"> + <FONT COLOR="#00CC00"> + <%= my $num_active_pkg = $agent->num_active_cust_pkg %> + </FONT> + </TH> + <TD> + <% if ( $num_active_pkg ) { %> + <A HREF="<%= $cust_pkg_link %>&magic=active"><% } %>active<% if ( $num_active_pkg ) { %></A><% } %> + </TD> + </TR> + <TR> + <TH ALIGN="right" WIDTH="40%"> + <FONT COLOR="#FF9900"> + <%= my $num_susp_pkg = $agent->num_susp_cust_pkg %> + </FONT> + </TH> + <TD> + <% if ( $num_susp_pkg ) { %> + <A HREF="<%= $cust_pkg_link %>&magic=suspended"><% } %>suspended<% if ( $num_susp_pkg ) { %></A><% } %> + </TD> + </TR> + <TR> + <TH ALIGN="right" WIDTH="40%"> + <FONT COLOR="#FF0000"> + <%= my $num_cancel_pkg = $agent->num_cancel_cust_pkg %> + </FONT> + </TH> + <TD> + <% if ( $num_cancel_pkg ) { %> + <A HREF="<%= $cust_pkg_link %>&magic=cancelled"><% } %>cancelled<% if ( $num_cancel_pkg ) { %></A><% } %> + </TD> + </TR> + </TABLE> + </TD> + + <TD> <A HREF="<%= $p %>search/report_cust_pay.html?agentnum=<%= $agent->agentnum %>">Payments</A> <BR><A HREF="<%= $p %>search/report_cust_credit.html?agentnum=<%= $agent->agentnum %>">Credits</A> <BR><A HREF="<%= $p %>search/report_receivables.cgi?agentnum=<%= $agent->agentnum %>">A/R Aging</A> |