1 <% $cgi->redirect($p. "view/cust_main.cgi?". $custnum) %>
5 unless $FS::CurrentUser::CurrentUser->access_right('Unapply credit');
8 my($query) = $cgi->keywords;
9 $query =~ /^(\d+)$/ || die "Illegal crednum";
12 my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } );
13 my $custnum = $cust_credit->custnum;
15 foreach my $cust_credit_bill ( $cust_credit->cust_credit_bill ) {
16 my $error = $cust_credit_bill->delete;
17 errorpage($error) if $error;