X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fagent.cgi;h=6f2864106ca28f0715fef23aa8183c1cc77b9a4b;hb=e77413eda0cd0e13d0acd9edaae9fe1451248346;hp=e9969b02a1bb681d1514343e7f60faf96bed85a2;hpb=5f6615875ca497d46c4f8cd810310d4b2db24bfd;p=freeside.git diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi index e9969b02a..6f2864106 100755 --- a/httemplate/browse/agent.cgi +++ b/httemplate/browse/agent.cgi @@ -1,19 +1,4 @@ -% -% -% my %search; -% if ( $cgi->param('showdisabled') -% || !dbdef->table('agent')->column('disabled') ) { -% %search = (); -% } else { -% %search = ( 'disabled' => '' ); -% } -% -% my $conf = new FS::Conf; -% -% - <% include("/elements/header.html",'Agent Listing', menubar( - 'Main Menu' => $p, 'Agent Types' => $p. 'browse/agent_type.cgi', # 'Add new agent' => '../edit/agent.cgi' )) %> @@ -35,30 +20,34 @@ full offerings (via their type).

% my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = ''; -% - param('showdisabled') || !dbdef->table('agent')->column('disabled') ) ? 2 : 3 %>>Agent Type + Master Customer + Commissions + Access Groups + Invoice
Template
Customers Customer
packages
Reports - Registration codes + Registration
codes
Prepaid cards -% if ( $conf->config('ticket_system') ) { +% if ( $conf->config('ticket_system') ) { Ticketing % } +% if ( $conf->config('currencies') ) { + Currencies +% } + Payment Gateway Overrides - Freq. - Prog. + Configuration Overrides -% + %# Agent # %# Agent -% %foreach my $agent ( sort { % #$a->getfield('agentnum') <=> $b->getfield('agentnum') % $a->getfield('agent') cmp $b->getfield('agent') @@ -74,25 +63,81 @@ full offerings (via their type).

% } else { % $bgcolor = $bgcolor1; % } -% -% - - - <% $agent->agentnum %> -% if ( dbdef->table('agent')->column('disabled') -% && !$cgi->param('showdisabled') ) { - <% $agent->disabled ? 'DISABLED' : '' %> -% } + + <% $agent->agentnum %> + +% if ( ! $cgi->param('showdisabled') ) { + + <% $agent->disabled ? 'DISABLED' + : 'Active' + %> + +% } + + + <% $agent->agent %> + - - <% $agent->agent %> - <% $agent->agent_type->atype %> + + <% $agent->agent_type->atype %> + +% if ( $agent->agent_custnum ) { + <& /elements/small_custview.html, + $agent->agent_custnum, + scalar($conf->config('countrydefault')), + 1, #show balance + $p.'view/cust_main.cgi', + &> +% } + + + + + + +% #surprising amount of false laziness w/ edit/process/agent.cgi +% my @pkg_class = qsearch('pkg_class', { 'disabled'=>'' }); +% foreach my $pkg_class ( '', @pkg_class ) { +% my %agent_pkg_class = ( 'agentnum' => $agent->agentnum, +% 'classnum' => $pkg_class ? $pkg_class->classnum : '' +% ); +% my $agent_pkg_class = +% qsearchs( 'agent_pkg_class', \%agent_pkg_class ) +% || new FS::agent_pkg_class \%agent_pkg_class; +% my $param = 'classnum'. $agent_pkg_class{classnum}; + + + + + + +% } + +
<% $agent_pkg_class->commission_percent || 0 %>%<% $pkg_class ? $pkg_class->classname : mt('(no package class)') |h %> +
+ + + + +% foreach my $access_group ( +% map $_->access_group, +% qsearch('access_groupagent', { 'agentnum' => $agent->agentnum }) +% ) { + <% $access_group->groupname |h %>
+% } + + + + <% $agent->invoice_template || '(Default)' %> + + + @@ -285,9 +330,10 @@ cancelled @@ -319,19 +365,23 @@ Unused
Generate cards -% if ( $conf->config('ticket_system') ) { - +% if ( $conf->config('ticket_system') ) { % } +% if ( $conf->config('currencies') ) { + % } - - + % }
- Payments + Package Churn +
Payments
Credits -
A/R Aging +
A/R Aging
-% if ( $agent->ticketing_queueid ) { - - Queue: <% $agent->ticketing_queueid %>: <% $agent->ticketing_queue %>
+% if ( $agent->ticketing_queueid ) { + Queue: <% $agent->ticketing_queueid %>: + <% $agent->ticketing_queue %> +
+% } +
+ <% join('
', sort keys %{ $agent->agent_currency_hashref } ) %>
% foreach my $override ( @@ -347,7 +397,7 @@ Unused ? ' for '. $override->taxclass. ' only' : '' %> - (delete) + (delete) % } @@ -358,15 +408,54 @@ Unused
+ +% foreach my $override ( +% qsearch('conf', { 'agentnum' => $agent->agentnum } ) +% ) { +% + + + + +% } + + + + +
+ <% $override->name %> (delete) +
(view/add/edit overrides)
+
+ + + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my %search; +if ( $cgi->param('showdisabled') + || !dbdef->table('agent')->column('disabled') ) { + %search = (); +} else { + %search = ( 'disabled' => '' ); +} + +my $conf = new FS::Conf; + +