X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fagent.cgi;h=1c06f1b15c3904796cfa77f7f8651732a7f2af6b;hp=001e6ba5051aa2b216e4bd9d242bc37d7cb22020;hb=6873aec01740ea7c70a5e20a3f3bce6e76bca410;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0 diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi index 001e6ba50..1c06f1b15 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,29 @@ 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 + 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 % } 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 +58,53 @@ 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 ( dbdef->table('agent')->column('disabled') +% && !$cgi->param('showdisabled') ) { + + <% $agent->disabled ? 'DISABLED' : '' %> + +% } - - <% $agent->agent %> - <% $agent->agent_type->atype %> + + <% $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)' %> + + + @@ -285,9 +297,10 @@ cancelled @@ -332,8 +345,8 @@ Unused % } -
- Payments + Package Churn +
Payments
Credits -
A/R Aging +
A/R Aging
- + - + % }
+ % foreach my $override ( % # sort { } want taxclass-full stuff first? and default cards (empty cardtype) % qsearch('agent_payment_gateway', { 'agentnum' => $agent->agentnum } ) @@ -347,7 +360,7 @@ Unused ? ' for '. $override->taxclass. ' only' : '' %> - (delete) + (delete) % } @@ -358,15 +371,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; + +