X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fbulk_pkg_increment_bill.cgi;h=48c9de7596be2fd0b34e8d20c13b396e30090e0d;hb=560af69840e7e3fcebf65d5d56ca4efc0851efec;hp=8da849508f295d01fb9670bebb8cf15193390d0f;hpb=1aecd5bf33146bf3f374341a3814960ae1d419e8;p=freeside.git diff --git a/httemplate/misc/process/bulk_pkg_increment_bill.cgi b/httemplate/misc/process/bulk_pkg_increment_bill.cgi index 8da849508..48c9de759 100755 --- a/httemplate/misc/process/bulk_pkg_increment_bill.cgi +++ b/httemplate/misc/process/bulk_pkg_increment_bill.cgi @@ -2,7 +2,7 @@ % $cgi->param('error', $error); <% $cgi->redirect(popurl(2). 'bulk_pkg_increment_bill.cgi?'. $cgi->query_string ) %> %} else { -<% header('Packages Adjusted') %> +<& /elements/header-popup.html, 'Packages Adjusted' &> @@ -25,17 +25,43 @@ 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); +#scalars +for (qw( agentnum cust_status cust_main_salesnum salesnum custnum magic status + custom cust_fields pkgbatch zip + 477part 477rownum date + )) +{ + $search_hash{$_} = $cgi->param($_) if length($cgi->param($_)); +} + +#arrays +for my $param (qw( pkgpart classnum refnum towernum )) { + $search_hash{$param} = [ $cgi->param($param) ] + if grep { $_ eq $param } $cgi->param; +} + +#scalars that need to be passed if empty +for my $param (qw( censustract censustract2 )) { + $search_hash{$param} = $cgi->param($param) || '' + if grep { $_ eq $param } $cgi->param; +} + +#location flags (checkboxes) +my @loc = grep /^\w+$/, $cgi->param('loc'); +$search_hash{"location_$_"} = 1 foreach @loc; + +my $report_option = $cgi->param('report_option'); +$search_hash{report_option} = $report_option if $report_option; + +for my $param (grep /^report_option_any/, $cgi->param) { + $search_hash{$param} = $cgi->param($param); } ### # parse dates ### -#false laziness w/report_cust_pkg.html -# and, now, w/bulk_change_pkg.cgi +#false laziness w/report_cust_pkg.html and bulk_change_pkg.cgi my %disable = ( 'all' => {}, 'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, }, @@ -45,7 +71,9 @@ my %disable = ( '' => {}, ); -foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) { +foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end change_date cancel active )) { + + $search_hash{$field.'_null'} = scalar( $cgi->param($field.'_null') ); my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field);