blob: 31b7a6201ec20cd0d37cf2ef06aa97b5987ec3da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
%if ( $error ) {
% errorpage($error);
%} else {
<% $cgi->redirect($p. "view/cust_main.cgi?". $custnum) %>
%}
<%init>
#untaint paynum
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ || die "Illegal paynum";
my $paynum = $1;
my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum});
my $right = 'Void payments';
$right = 'Credit card void' if $cust_pay->payby eq 'CARD';
$right = 'Echeck void' if $cust_pay->payby eq 'CHEK';
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right($right);
my $custnum = $cust_pay->custnum;
my $error = $cust_pay->void;
</%init>
|