diff options
author | cvs2git <cvs2git> | 2004-03-12 12:39:58 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2004-03-12 12:39:58 +0000 |
commit | cddf497bc74a127415f97188e27b70c04bd415ef (patch) | |
tree | 9002d3585595d4b626f4aa079b1f55ddb55b76a2 /httemplate/misc | |
parent | 953000c107a70b50e91e01353076e3e50aa0dbbe (diff) | |
parent | 92fa788fb842baab8fa185e159d8effde739bd74 (diff) |
This commit was manufactured by cvs2svn to create branch
'FREESIDE_1_4_BRANCH'.
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-x | httemplate/misc/unapply-cust_credit.cgi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/httemplate/misc/unapply-cust_credit.cgi b/httemplate/misc/unapply-cust_credit.cgi new file mode 100755 index 000000000..c658d2acc --- /dev/null +++ b/httemplate/misc/unapply-cust_credit.cgi @@ -0,0 +1,18 @@ +<% + +#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; + +foreach my $cust_credit_bill ( $cust_credit->cust_credit_bill ) { + my $error = $cust_credit_bill->delete; + eidiot($error) if $error; +} + +print $cgi->redirect($p. "view/cust_main.cgi?". $custnum); + +%> |