fix 'Can't call method "setup" on an undefined value' error when using into rates...
[freeside.git] / httemplate / misc / unsusp_pkg.cgi
1 %if ( $error ) {
2 %  errorpage($error);
3 %} else {
4 <% $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')) %>
5 %}
6 <%init>
7
8 die "access denied"
9   unless $FS::CurrentUser::CurrentUser->access_right('Unsuspend customer package');
10
11 #untaint pkgnum
12 my ($query) = $cgi->keywords;
13 $query =~ /^(\d+)$/ || die "Illegal pkgnum";
14 my $pkgnum = $1;
15
16 my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
17
18 my $error = $cust_pkg->unsuspend;
19
20 </%init>