1 <% include( 'elements/search.html',
2 'title' => 'Unused Registration Codes for '.
4 'name' => 'registration codes',
5 'query' => { 'table' => 'reg_code',
6 'hashref' => { 'agentnum' => $agentnum, },
8 'count_query' => $count_query,
10 'header' => [ qw(Code Packages) ],
15 qq!<A HREF="${p}edit/part_pkg.cgi?!. $_->pkgpart. '">'.
16 $_->pkg_comment(nopkgpart => 1).
31 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
33 my $agentnum = $cgi->param('agentnum');
34 $agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum");
36 my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
38 my $count_query = "SELECT COUNT(*) FROM reg_code WHERE agentnum = $agentnum";