1 <% include('/elements/header-popup.html', 'Bulk package change') %>
3 <% include('/elements/init_overlib.html') %>
5 <% include('/elements/progress-init.html',
7 [qw( old_pkgpart new_pkgpart )],
8 'process/bulk-cust_pkg.cgi',
9 $p.'browse/part_pkg.cgi',
13 <SCRIPT TYPE="text/javascript">
14 function areyousure() {
15 var warning = 'Change these packages?';
16 if(confirm(warning)) {
21 <FORM NAME="OneTrueForm">
22 % #false laziness with bulk-cust_svc.html
23 % $cgi->param('pkgpart') =~ /^(\d+)$/
24 % or die "illegal pkgpart: ". $cgi->param('pkgpart');
26 % my $old_pkgpart = $1;
27 % my $src_part_pkg = qsearchs('part_pkg', { 'pkgpart' => $old_pkgpart } )
28 % or die "unknown pkgpart: $old_pkgpart";
32 <INPUT NAME="old_pkgpart" TYPE="hidden" VALUE="<% $old_pkgpart %>">
33 Change <B><% $src_part_pkg->pkg_comment %></B><BR>
35 to new package definition
36 <SELECT NAME="new_pkgpart">
37 % foreach my $dest_part_pkg ( qsearch('part_pkg', { 'disabled' => '' } ) ) {
39 <OPTION VALUE="<% $dest_part_pkg->pkgpart %>"><% $dest_part_pkg->pkgpart %>: <% $dest_part_pkg->pkg %>
45 %#<INPUT TYPE="checkbox" NAME="keep_dates" CHECKED> Preserve all billing dates <I>(strongly recommended)</I>
49 <INPUT TYPE="button" VALUE="Bulk change packages" onclick="areyousure()">
53 <% include('/elements/footer.html') %>
58 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');