X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fcancel-unaudited.cgi;h=5d3c8731617a39f19ec9de9787a4f68d795b70b4;hp=a73b2ce974dc27f1fbc4b407411be837eeca08ef;hb=a4c96748eb6eab29a70f3a944c6520283a635c78;hpb=22a35047ecdffff80110e06cc08fc84f9ddba9b0 diff --git a/httemplate/misc/cancel-unaudited.cgi b/httemplate/misc/cancel-unaudited.cgi index a73b2ce97..5d3c87316 100755 --- a/httemplate/misc/cancel-unaudited.cgi +++ b/httemplate/misc/cancel-unaudited.cgi @@ -30,15 +30,18 @@ $error = $svc_acct->delete; &myeidiot($error) if $error; $error = $cust_svc->delete; -&myeidiot($error) if $error; - -$dbh->commit or die $dbh->errstr; - -print $cgi->redirect(popurl(2)); -sub myeidiot { +if ( $error ) { $dbh->rollback; + %> + +<% &eidiot(@_); +} else { + + $dbh->commit or die $dbh->errstr; + + print $cgi->redirect(popurl(2)); } %>