From 7905f5dfd903529a6de89875e6fae74638a89aa3 Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 1 Jul 2008 05:03:42 +0000 Subject: correct internal reason searching, prevent interleaved suspend/cancel/expire/adjourn, backporting and refactoring --- httemplate/misc/unexpire_pkg.cgi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 httemplate/misc/unexpire_pkg.cgi (limited to 'httemplate/misc/unexpire_pkg.cgi') diff --git a/httemplate/misc/unexpire_pkg.cgi b/httemplate/misc/unexpire_pkg.cgi new file mode 100755 index 000000000..445025524 --- /dev/null +++ b/httemplate/misc/unexpire_pkg.cgi @@ -0,0 +1,17 @@ +%if ( $error ) { +% errorpage($error); +%} else { +<% $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')) %> +%} +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Cancel customer package later'); + +my ($pkgnum) = $cgi->keywords; +my $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } ); +my $error = "No package $pkgnum" unless $cust_pkg; + +$error ||= $cust_pkg->unexpire; + + -- cgit v1.2.1