& /elements/header.html, mt('Bulk add [_1]',$svc) &>
<& /elements/error.html &>
% if ( $cust_main ) {
<& /elements/small_custview.html, $cust_main, '', 1,
popurl(2) . "view/cust_main.cgi" &>
% }
<& /elements/footer.html &>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Bulk provision customer service');
$cgi->param('pkgnum') =~ /^(\d+)$/ or die 'unparsable pkgnum';
my $pkgnum = $1;
my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $pkgnum })
or die 'unknown pkgnum';
my $cust_main = $cust_pkg->cust_main;
$cgi->param('svcpart') =~ /^(\d+)$/ or die 'unparsable svcpart';
my $svcpart = $1;
my $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
die "No part_svc entry!" unless $part_svc;
my $svc = $part_svc->getfield('svc');
%init>