-<%
+<% $cgi->redirect($p. "view/cust_main.cgi?". $custnum) %>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Unapply credit');
#untaint crednum
my($query) = $cgi->keywords;
foreach my $cust_credit_bill ( $cust_credit->cust_credit_bill ) {
my $error = $cust_credit_bill->delete;
- eidiot($error) if $error;
+ errorpage($error) if $error;
}
-print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
-
-%>
+</%init>