From a953abfe224ff0fbdefbec6672daf12efff3ee65 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 22 Dec 2016 16:01:11 -0800 Subject: [PATCH] package search on null dates, RT#73715 --- httemplate/misc/bulk_change_pkg.cgi | 28 +++++++++++++++++----- httemplate/misc/bulk_pkg_increment_bill.cgi | 28 +++++++++++++++++----- httemplate/misc/process/bulk_change_pkg.cgi | 2 +- .../misc/process/bulk_pkg_increment_bill.cgi | 2 +- 4 files changed, 46 insertions(+), 14 deletions(-) diff --git a/httemplate/misc/bulk_change_pkg.cgi b/httemplate/misc/bulk_change_pkg.cgi index 4964e598f..6ed272fb8 100755 --- a/httemplate/misc/bulk_change_pkg.cgi +++ b/httemplate/misc/bulk_change_pkg.cgi @@ -10,16 +10,32 @@ %# some false laziness w/search/cust_pkg.cgi -% for my $param (qw(agentnum custnum magic status classnum custom censustract)) { - -% } +% for my $param ( +% qw( +% agentnum cust_status cust_main_salesnum salesnum custnum magic status +% custom pkgbatch zip +% 477part 477rownum date +% report_option +% ), +% grep { /^location_\w+$/ || /^report_option_any/ } $cgi->param +% ) { + +% } +% +% for my $param (qw( censustract censustract2 ) ) { +% next unless grep { $_ eq $param } $cgi->param; + +% } % -% foreach my $pkgpart ($cgi->param('pkgpart')) { - +% for my $param (qw( pkgpart classnum refnum towernum )) { +% foreach my $value ($cgi->param($param)) { + +% } % } % -% 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 )) { % + "> "> "> "> diff --git a/httemplate/misc/bulk_pkg_increment_bill.cgi b/httemplate/misc/bulk_pkg_increment_bill.cgi index d594b558a..fc9bbc893 100755 --- a/httemplate/misc/bulk_pkg_increment_bill.cgi +++ b/httemplate/misc/bulk_pkg_increment_bill.cgi @@ -10,16 +10,32 @@ %# some false laziness w/search/cust_pkg.cgi -% for my $param (qw(agentnum custnum magic status classnum custom censustract)) { - -% } +% for my $param ( +% qw( +% agentnum cust_status cust_main_salesnum salesnum custnum magic status +% custom pkgbatch zip +% 477part 477rownum date +% report_option +% ), +% grep { /^location_\w+$/ || /^report_option_any/ } $cgi->param +% ) { + +% } +% +% for my $param (qw( censustract censustract2 ) ) { +% next unless grep { $_ eq $param } $cgi->param; + +% } % -% foreach my $pkgpart ($cgi->param('pkgpart')) { - +% for my $param (qw( pkgpart classnum refnum towernum )) { +% foreach my $value ($cgi->param($param)) { + +% } % } % -% 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 )) { % + "> "> "> "> diff --git a/httemplate/misc/process/bulk_change_pkg.cgi b/httemplate/misc/process/bulk_change_pkg.cgi index e22dafef0..469ae7c1e 100755 --- a/httemplate/misc/process/bulk_change_pkg.cgi +++ b/httemplate/misc/process/bulk_change_pkg.cgi @@ -30,7 +30,7 @@ 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 )) { my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field); diff --git a/httemplate/misc/process/bulk_pkg_increment_bill.cgi b/httemplate/misc/process/bulk_pkg_increment_bill.cgi index d89f49120..b7349107f 100755 --- a/httemplate/misc/process/bulk_pkg_increment_bill.cgi +++ b/httemplate/misc/process/bulk_pkg_increment_bill.cgi @@ -45,7 +45,7 @@ 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 )) { my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field); -- 2.11.0