% my $bgcolor1 = '#eeeeee';
% my $bgcolor2 = '#ffffff';
% my $bgcolor = '';
-%
-
<TR>
<TH CLASS="grid" BGCOLOR="#cccccc" COLSPAN=<% ( $cgi->param('showdisabled') || !dbdef->table('agent')->column('disabled') ) ? 2 : 3 %>>Agent</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Type</TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc">Master Customer</TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc">Access Groups</TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Invoice<BR>Template</FONT></TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Customers</TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Customer<BR>packages</FONT></TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Reports</TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Registration<BR>codes</FONT></TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Prepaid cards</TH>
-% if ( $conf->config('ticket_system') ) {
+% if ( $conf->config('ticket_system') ) {
<TH CLASS="grid" BGCOLOR="#cccccc">Ticketing</TH>
% }
<TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Payment Gateway Overrides</FONT></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Configuration Overrides</FONT></TH>
</TR>
-%
+
%# <TH><FONT SIZE=-1>Agent #</FONT></TH>
%# <TH>Agent</TH>
-%
%foreach my $agent ( sort {
% #$a->getfield('agentnum') <=> $b->getfield('agentnum')
% $a->getfield('agent') cmp $b->getfield('agent')
% } else {
% $bgcolor = $bgcolor1;
% }
-%
-%
-
<TR>
<A HREF="<%$p%>edit/agent_type.cgi?<% $agent->typenum %>"><% $agent->agent_type->atype %></A>
</TD>
+ <TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
+% if ( $agent->agent_custnum ) {
+ <% include('/elements/small_custview.html',
+ $agent->agent_custnum,
+ scalar($conf->config('countrydefault')),
+ 1, #show balance
+ )
+ %>
+% }
+ </TD>
+
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
+% foreach my $access_group (
+% map $_->access_group,
+% qsearch('access_groupagent', { 'agentnum' => $agent->agentnum })
+% ) {
+ <A HREF="<%$p%>edit/access_group.html?<% $access_group->groupnum %>"><% $access_group->groupname |h %><BR>
+% }
+ </TD>
+
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
<% $agent->invoice_template || '(Default)' %>
</TD>
- <TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
+ <TD CLASS="inv" BGCOLOR="<% $bgcolor %>" VALIGN="bottom">
<TABLE CLASS="inv" CELLSPACING=0 CELLPADDING=0>
<TR>
? ' for '. $override->taxclass. ' only'
: ''
%>
- <FONT SIZE=-1><A HREF="<%$p%>misc/delete-agent_payment_gateway.cgi?<% $override->agentgatewaynum %>">(delete)</A></FONT>
+ <FONT SIZE=-1><A HREF="javascript:areyousure('delete this payment gateway override', '<%$p%>misc/delete-agent_payment_gateway.cgi?<% $override->agentgatewaynum %>')">(delete)</A></FONT>
</TD>
</TR>
% }
<TR>
<TD>
- <% $override->name %>
- <FONT SIZE=-1><A HREF="<%$p%>config/config-delete.cgi?<% $override->confnum %>">(delete)</A></FONT>
+ <% $override->name %> <FONT SIZE=-1><A HREF="javascript:areyousure('delete this configuration override', '<%$p%>config/config-delete.cgi?confnum=<% $override->confnum %>')">(delete)</A></FONT>
</TD>
</TR>
% }
<TR>
- <TD><FONT SIZE=-1><A HREF="<%$p%>config/config-view.cgi?agentnum=<% $agent->agentnum %>">(add override)</A></FONT></TD>
+ <TD><FONT SIZE=-1><A HREF="<%$p%>config/config-view.cgi?agentnum=<% $agent->agentnum %>">(view/add/edit overrides)</A></FONT></TD>
</TR>
</TABLE>
</TD>
</TABLE>
+
+<SCRIPT TYPE="text/javascript">
+ function areyousure(what, href) {
+ if ( confirm("Are you sure you want to " + what + "?") == true )
+ window.location.href = href;
+ }
+</SCRIPT>
+
</BODY>
</HTML>
<%init>