From 0bd6fd8b74c3cb6a7abf01ba5974d2d9399da3ab Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 21 Oct 2019 12:20:00 -0700 Subject: bulk package cancellation --- httemplate/misc/bulk_cancel_pkg.cgi | 83 +++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 httemplate/misc/bulk_cancel_pkg.cgi (limited to 'httemplate/misc/bulk_cancel_pkg.cgi') diff --git a/httemplate/misc/bulk_cancel_pkg.cgi b/httemplate/misc/bulk_cancel_pkg.cgi new file mode 100644 index 000000000..5499af19d --- /dev/null +++ b/httemplate/misc/bulk_cancel_pkg.cgi @@ -0,0 +1,83 @@ +<% include('/elements/header-popup.html', "Cancel Packages") %> + +% if ( $cgi->param('error') ) { + Error: <% $cgi->param('error') %> +

+% } + +
+ +%# some false laziness w/search/cust_pkg.cgi + + +% for my $param ( +% qw( +% agentnum cust_status cust_main_salesnum salesnum custnum magic status +% custom pkgbatch zip reasonnum +% 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; + +% } +% +% 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 contract_end change_date cancel active )) { +% + "> + "> + "> + "> + "> +% } + +<% ntable('#cccccc') %> + +%# <& /elements/tr-input-date-field.html, { +%# 'name' => 'cancel_date', +%# 'label' => mt("Cancel package on"), +%# 'format' => $date_format, +%# } &> +%# (Leave blank to cancel immediately) + + <& /elements/tr-select-reason.html, + field => 'cancel_reasonnum', + reason_class => 'C', + &> + + + +
+ + +
+ + + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages'); + +#use Date::Parse qw(str2time); +# + +my $conf = new FS::Conf; +#my $date_format = $conf->config('date_format') || '%m/%d/%Y'; + + -- cgit v1.2.1