<% include('/elements/header.html', 'Generate registration codes for '. $agent->agent) %> <% include('/elements/error.html') %>
Generate % my $num = ''; % if ( $cgi->param('num') =~ /^\s*(\d+)\s*$/ ) { % $num = $1; % } registration codes for <% $agent->agent %> allowing the following packages:

% foreach my $part_pkg ( qsearch('part_pkg', { 'disabled' => '' } ) ) { % my $pkgpart = $part_pkg->pkgpart; param("pkgpart$pkgpart") ? 'CHECKED' : '' %>> <% $part_pkg->pkg_comment %>
% }
<% include('/elements/footer.html') %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); my $agentnum = $cgi->param('agentnum'); $agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum"); $agentnum = $1; my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );