diff options
Diffstat (limited to 'httemplate/misc/cancel_pkg.cgi')
-rwxr-xr-x | httemplate/misc/cancel_pkg.cgi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/httemplate/misc/cancel_pkg.cgi b/httemplate/misc/cancel_pkg.cgi new file mode 100755 index 000000000..0487677df --- /dev/null +++ b/httemplate/misc/cancel_pkg.cgi @@ -0,0 +1,15 @@ +<% + +#untaint pkgnum +my($query) = $cgi->keywords; +$query =~ /^(\d+)$/ || die "Illegal pkgnum"; +my $pkgnum = $1; + +my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); + +my $error = $cust_pkg->cancel; +eidiot($error) if $error; + +print $cgi->redirect($p. "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); + +%> |