blob: 519e6c2b2ea6e9540a8836b417ccf8a67257d40d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<%
my $custnum;
my $ban = '';
if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
$custnum = $1;
$ban = $cgi->param('ban');
} else {
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ || die "Illegal custnum";
$custnum = $1;
}
my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
my @errors = $cust_main->cancel( 'ban' => $ban );
eidiot(join(' / ', @errors)) if scalar(@errors);
#print $cgi->redirect($p. "view/cust_main.cgi?". $cust_main->custnum);
print $cgi->redirect($p);
%>
|