search svc_acct by service def
[freeside.git] / httemplate / misc / delete-cust_refund.cgi
1 % if ( $error ) {
2 %   errorpage($error);
3 % } else {
4 <% $cgi->redirect($p. "view/cust_main.cgi?". $custnum) %>
5 % }
6 <%init>
7
8 die "access denied"
9   unless $FS::CurrentUser::CurrentUser->access_right('Delete refund');
10
11 #untaint refundnum
12 my($query) = $cgi->keywords;
13 $query =~ /^(\d+)$/ || die "Illegal refundnum";
14 my $refundnum = $1;
15
16 my $cust_refund = qsearchs('cust_refund',{'refundnum'=>$refundnum});
17 my $custnum = $cust_refund->custnum;
18
19 my $error = $cust_refund->delete;
20
21 </%init>