% include("/elements/header.html",'Agent Listing', menubar(
'Agent Types' => $p. 'browse/agent_type.cgi',
# 'Add new agent' => '../edit/agent.cgi'
)) %>
Agents are resellers of your service. Agents may be limited to a subset of your
full offerings (via their type).
Add a new agent
% if ( dbdef->table('agent')->column('disabled') ) {
<% $cgi->param('showdisabled')
? do { $cgi->param('showdisabled', 0);
'( hide disabled agents )'; }
: do { $cgi->param('showdisabled', 1);
'( show disabled agents )'; }
%>
% }
<% include('/elements/table-grid.html') %>
% my $bgcolor1 = '#eeeeee';
% my $bgcolor2 = '#ffffff';
% my $bgcolor = '';
<% $agent->agentnum %>
|
% if ( ! $cgi->param('showdisabled') ) {
<% $agent->disabled ? 'DISABLED'
: 'Active'
%>
|
% }
<% $agent->agent %>
|
<% $agent->agent_type->atype %>
|
% if ( $agent->agent_custnum ) {
<% include('/elements/small_custview.html',
$agent->agent_custnum,
scalar($conf->config('countrydefault')),
1, #show balance
)
%>
% }
|
% foreach my $access_group (
% map $_->access_group,
% qsearch('access_groupagent', { 'agentnum' => $agent->agentnum })
% ) {
<% $access_group->groupname |h %>
% }
|
<% $agent->invoice_template || '(Default)' %>
|
|
|
Package Churn
Payments
Credits
A/R Aging
|
<% my $num_reg_code = $agent->num_reg_code %>
% if ( $num_reg_code ) {
% }
Unused
% if ( $num_reg_code ) {
% }
Generate codes
|
<% my $num_prepay_credit = $agent->num_prepay_credit %>
% if ( $num_prepay_credit ) {
% }
Unused
% if ( $num_prepay_credit ) {
% }
Generate cards
|
% if ( $conf->config('ticket_system') ) {
% if ( $agent->ticketing_queueid ) {
Queue: <% $agent->ticketing_queueid %>: <% $agent->ticketing_queue %>
% }
|
% }
% foreach my $override (
% # sort { } want taxclass-full stuff first? and default cards (empty cardtype)
% qsearch('agent_payment_gateway', { 'agentnum' => $agent->agentnum } )
% ) {
%
<% $override->cardtype || 'Default' %> to <% $override->payment_gateway->gateway_module %> (<% $override->payment_gateway->gateway_username %>)
<% $override->taxclass
? ' for '. $override->taxclass. ' only'
: ''
%>
(delete)
|
% }
(add override) |
|
|
% }