<% include('/elements/header-popup.html', "Suspend 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') %> % my $date_init = 0; <& /elements/tr-input-date-field.html, { 'name' => 'suspend_date', 'value' => $date, 'label' => mt("Suspend package on"), 'format' => $date_format, } &> % $date_init = 1; <& /elements/tr-select-reason.html, field => 'suspend_reasonnum', reason_class => 'S', &> % if ( $FS::CurrentUser::CurrentUser->access_right('Unsuspend customer package')) { <& /elements/tr-input-date-field.html, { 'name' => 'suspend_resume_date', 'value' => '', 'label' => mt('Unsuspend on'), 'format' => $date_format, 'noinit' => $date_init, } &> % }
<%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'; my $date = time;