X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fbulk_change_pkg.cgi;fp=httemplate%2Fmisc%2Fbulk_change_pkg.cgi;h=ebf20ebc2a4b90537ea48db9525be8b681d43959;hp=0000000000000000000000000000000000000000;hb=d0aca10ecd6edb171555eb87b1570daa3d2820b1;hpb=0b4247f88f8a290a7bbbdebe93404baef2d1e29d diff --git a/httemplate/misc/bulk_change_pkg.cgi b/httemplate/misc/bulk_change_pkg.cgi new file mode 100755 index 000000000..ebf20ebc2 --- /dev/null +++ b/httemplate/misc/bulk_change_pkg.cgi @@ -0,0 +1,69 @@ +<% include('/elements/header-popup.html', "Change Packages") %> + +% if ( $cgi->param('error') ) { + Error: <% $cgi->param('error') %> +

+% } + +
+ + +% for my $param (qw(agentnum magic status classnum pkgpart)) { + +% } +% +% foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) { +% + "> + "> + "> + "> +% } + +<% ntable('#cccccc') %> + + + New package: + <% include('/elements/select-table.html', + 'table' => 'part_pkg', + 'name_col' => 'pkg', + 'empty_label' => 'Select package', + 'label_callback' => sub { $_[0]->pkgpart. ': '. + $_[0]->pkg. ' - '. + $_[0]->comment; + }, + 'element_name' => 'new_pkgpart', + 'curr_value' => ( $cgi->param('error') + ? scalar($cgi->param('new_pkgpart')) + : '' + ), + ) + %> + + + + + +
+ + +
+ + + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages'); + +#false laziness w/report_cust_pkg.html +my %disable = ( + 'all' => {}, + 'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, }, + 'active' => { 'susp'=>1, 'cancel'=>1 }, + 'suspended' => { 'cancel' => 1 }, + 'cancelled' => {}, + '' => {}, +); + +