summaryrefslogtreecommitdiff
path: root/httemplate/misc/delete-cust_credit.cgi
blob: 30de04d27ca03c8d88b6be842e662d4066896562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<%

#untaint crednum
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ || die "Illegal crednum";
my $crednum = $1;

my $cust_credit = qsearchs('cust_credit',{'crednum'=>$crednum});
my $custnum = $cust_credit->custnum;

my $error = $cust_credit->delete;
eidiot($error) if $error;

print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);

%>