diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /httemplate/misc/process/bulk_change_pkg.cgi | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'httemplate/misc/process/bulk_change_pkg.cgi')
-rwxr-xr-x | httemplate/misc/process/bulk_change_pkg.cgi | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/httemplate/misc/process/bulk_change_pkg.cgi b/httemplate/misc/process/bulk_change_pkg.cgi deleted file mode 100755 index e22dafef0..000000000 --- a/httemplate/misc/process/bulk_change_pkg.cgi +++ /dev/null @@ -1,56 +0,0 @@ -% if ($error) { -<% $cgi->redirect(popurl(2)."/bulk_change_pkg.cgi?".$cgi->query_string ) %> -% } -<% include('/elements/header-popup.html', "Packages Changed") %> -<%init> - -die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages'); - -my %search_hash = (); - -$search_hash{'query'} = $cgi->param('query'); - -for my $param (qw(agentnum magic status classnum pkgpart)) { - $search_hash{$param} = $cgi->param($param) - if $cgi->param($param); -} - -### -# parse dates -### - -#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' => {}, - '' => {}, -); - -foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) { - - my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field); - - next if $beginning == 0 && $ending == 4294967295 - or $disable{$cgi->param('status')}->{$field}; - - $search_hash{$field} = [ $beginning, $ending ]; - -} - -my $sql_query = FS::cust_pkg->search(\%search_hash); -$sql_query->{'select'} = 'cust_pkg.pkgnum'; - -my $error = FS::cust_pkg::bulk_change( [ $cgi->param('new_pkgpart') ], - [ map { $_->pkgnum } qsearch($sql_query) ], - ); - -$cgi->param("error", substr($error, 0, 512)); # arbitrary length believed - # suited for all supported - # browsers - - -</%init> |