2 <% $cgi->redirect($sales_link->[0] . $agentnum) %>
4 <& elements/commission.html,
6 'name_singular' => 'agent',
7 'header' => [ 'Agent' ],
8 'fields' => [ 'agent' ],
12 'count_query' => $count_query,
14 'sales_detail_link' => $sales_link,
15 'credit_detail_link' => $commission_link,
21 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
23 my $conf = new FS::Conf;
25 my %query = ( 'table' => 'agent' );
26 my $count_query = "SELECT COUNT(*) FROM agent";
29 if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
32 $cgi->delete('agentnum');
35 my $title = 'Agent commission';
37 my $sales_link = [ 'agent_pkg_class.html?agentnum=', 'agentnum' ];
39 my $commission_link = [ 'cust_credit.html?commission_agentnum=', 'agentnum' ];