2 % my $url = 'agent_pkg_class.html?' . $cgi->query_string;
3 <% $cgi->redirect($url) %>
5 <& elements/commission.html,
7 'name_singular' => 'agent',
8 'header' => [ 'Agent' ],
9 'fields' => [ 'agent' ],
13 'count_query' => $count_query,
15 'sales_detail_link' => $sales_link,
16 'credit_detail_link' => $commission_link,
22 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
24 my $conf = new FS::Conf;
26 my %query = ( 'table' => 'agent' );
27 my $count_query = "SELECT COUNT(*) FROM agent";
30 if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
33 $cgi->delete('agentnum');
36 my $title = 'Agent commission';
38 my $sales_link = [ 'agent_pkg_class.html?agentnum=', 'agentnum' ];
40 my $commission_link = [ 'cust_credit.html?commission_agentnum=', 'agentnum' ];