<& /elements/header-popup.html, mt('Unsuspend customer') &> <& /elements/error.html &>

<% mt('Unsuspend this customer?') |h %> % if ( $on_hold_pkgs > 0 ) { % } % if ( $susp_pkgs == 0 ) { # then always release holds, or this will do nothing % }
<% mt('Unsuspend now') |h %>
<% mt('Unsuspend on date: ') |h %> <& /elements/input-date-field.html, { 'name' => 'resume', 'value' => time, } &>
/> <% emt('Activate [quant,_1,on-hold package,on-hold packages]', $on_hold_pkgs) %>

         " onClick="parent.cClick();">

<%init> #false laziness w/cancel_cust.html $cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum'; my $custnum = $1; my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" unless $curuser->access_right('Unsuspend customer'); my $cust_main = qsearchs( { 'table' => 'cust_main', 'hashref' => { 'custnum' => $custnum }, 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, } ); die "No customer # $custnum" unless $cust_main; my $susp_pkgs = FS::cust_pkg->count( FS::cust_pkg->susp_sql . " AND custnum = ?", $custnum ); my $on_hold_pkgs = FS::cust_pkg->count( FS::cust_pkg->on_hold_sql . " AND custnum = ?", $custnum );