1 <% include('/elements/header-popup.html', "Suspend Packages") %>
3 % if ( $cgi->param('error') ) {
4 <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
8 <FORM ACTION="<% $p %>misc/process/bulk_suspend_pkg.cgi" METHOD=POST>
10 %# some false laziness w/search/cust_pkg.cgi
12 <INPUT TYPE="hidden" NAME="query" VALUE="<% $cgi->keywords |h %>">
15 % agentnum cust_status cust_main_salesnum salesnum custnum magic status
16 % custom pkgbatch zip reasonnum
17 % 477part 477rownum date
20 % grep { /^location_\w+$/ || /^report_option_any/ } $cgi->param
22 <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
25 % for my $param (qw( censustract censustract2 ) ) {
26 % next unless grep { $_ eq $param } $cgi->param;
27 <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
30 % for my $param (qw( pkgpart classnum refnum towernum )) {
31 % foreach my $value ($cgi->param($param)) {
32 <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $value |h %>">
36 % foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end change_date cancel active )) {
38 <INPUT TYPE="hidden" NAME="<% $field %>_null" VALUE="<% $cgi->param("${field}_null") |h %>">
39 <INPUT TYPE="hidden" NAME="<% $field %>_begin" VALUE="<% $cgi->param("${field}_begin") |h %>">
40 <INPUT TYPE="hidden" NAME="<% $field %>_beginning" VALUE="<% $cgi->param("${field}_beginning") |h %>">
41 <INPUT TYPE="hidden" NAME="<% $field %>_end" VALUE="<% $cgi->param("${field}_end") |h %>">
42 <INPUT TYPE="hidden" NAME="<% $field %>_ending" VALUE="<% $cgi->param("${field}_ending") |h %>">
45 <% ntable('#cccccc') %>
48 <& /elements/tr-input-date-field.html, {
49 'name' => 'suspend_date',
51 'label' => mt("Suspend package on"),
52 'format' => $date_format,
56 <& /elements/tr-select-reason.html,
57 field => 'suspend_reasonnum',
61 % if ( $FS::CurrentUser::CurrentUser->access_right('Unsuspend customer package')) {
63 <& /elements/tr-input-date-field.html, {
64 'name' => 'suspend_resume_date',
66 'label' => mt('Unsuspend on'),
67 'format' => $date_format,
68 'noinit' => $date_init,
75 <INPUT TYPE="submit" VALUE="Suspend Packages">
84 unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages');
86 #use Date::Parse qw(str2time);
87 #<table style="background-color: #cccccc; border-spacing: 2; width: 100%">
89 my $conf = new FS::Conf;
90 my $date_format = $conf->config('date_format') || '%m/%d/%Y';