blob: 7b484e93eb54f48b2cce72d0ae52e66d58330f4f (
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 = 'Regular void';
$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>
|