RT# 78952 CDR Import for Acme Packet Improved caller-id parsing
[freeside.git] / httemplate / misc / unapply-cust_pay_refund.cgi
1 <% $cgi->redirect($p. "view/cust_main.cgi?custnum=". $custnum. ";show=payment_history") %>
2 <%init>
3
4 die "access denied"
5   unless $FS::CurrentUser::CurrentUser->access_right('Unapply payment');
6
7 #untaint paynum
8 my($query) = $cgi->keywords;
9 $query =~ /^(\d+)$/ || die "Illegal paynum";
10 my $paynum = $1;
11
12 my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } );
13 my $custnum = $cust_pay->custnum;
14
15 my $error = $cust_pay->unapply_refund;
16 errorpage($error) if $error;
17
18 </%init>