diff options
Diffstat (limited to 'httemplate/misc/cancel-unaudited.cgi')
-rwxr-xr-x | httemplate/misc/cancel-unaudited.cgi | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/httemplate/misc/cancel-unaudited.cgi b/httemplate/misc/cancel-unaudited.cgi index 11cde968d..43e439b58 100755 --- a/httemplate/misc/cancel-unaudited.cgi +++ b/httemplate/misc/cancel-unaudited.cgi @@ -12,10 +12,13 @@ my $svcnum = $1; my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); die "Unknown svcnum!" unless $cust_svc; -&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.!) - if $cust_svc->pkgnum ne '' && $cust_svc->pkgnum ne '0'; +my $cust_pkg = $cust_svc->cust_pkg; +if ( $cust_pkg ) { + &eidiot( 'This account has already been audited. Cancel the '. + qq!<A HREF="${p}view/cust_main.cgi?!. $cust_pkg->custnum. + '#cust_pkg'. $cust_pkg->pkgnum. '">'. + 'package</A> instead.'); +} my $error = $cust_svc->cancel; |