diff options
Diffstat (limited to 'httemplate/misc/cancel-unaudited.cgi')
-rwxr-xr-x | httemplate/misc/cancel-unaudited.cgi | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/httemplate/misc/cancel-unaudited.cgi b/httemplate/misc/cancel-unaudited.cgi index 9b90967d9..3e2bd07db 100755 --- a/httemplate/misc/cancel-unaudited.cgi +++ b/httemplate/misc/cancel-unaudited.cgi @@ -1,28 +1,16 @@ -<% -#<!-- $Id: cancel-unaudited.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ --> - -use strict; -use vars qw( $cgi $query $svcnum $svc_acct $cust_svc $error $dbh ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl eidiot); -use FS::Record qw(qsearchs); -use FS::cust_svc; -use FS::svc_acct; - -$cgi = new CGI; -$dbh = &cgisuidsetup($cgi); +<!-- $Id: cancel-unaudited.cgi,v 1.3 2002-01-30 14:18:09 ivan Exp $ --> + +my $dbh = dbh; #untaint svcnum -($query) = $cgi->keywords; +my($query) = $cgi->keywords; $query =~ /^(\d+)$/; -$svcnum = $1; +my $svcnum = $1; -$svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); +my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); die "Unknown svcnum!" unless $svc_acct; -$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); +my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); &eidiot(qq!This account has already been audited. Cancel the <A HREF="!. popurl(2). qq!view/cust_pkg.cgi?! . $cust_svc->getfield('pkgnum') . qq!pkgnum"> package</A> instead.!) @@ -36,7 +24,7 @@ local $SIG{TSTP} = 'IGNORE'; local $FS::UID::AutoCommit = 0; -$error = $svc_acct->cancel; +my $error = $svc_acct->cancel; &myeidiot($error) if $error; $error = $svc_acct->delete; &myeidiot($error) if $error; |