diff options
author | ivan <ivan> | 2004-01-09 22:11:54 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-01-09 22:11:54 +0000 |
commit | f3212b82d6d54500bbe31c02c8ffa456f018a067 (patch) | |
tree | 71af32913a105b30f105a0eeb2bab4caa668ff38 /httemplate/misc/delete-cust_credit.cgi | |
parent | e68e85f88922d6678a9c6fc1a7624065e38b7361 (diff) |
add deletecredits config value to enable deletion of credits
Diffstat (limited to 'httemplate/misc/delete-cust_credit.cgi')
-rwxr-xr-x | httemplate/misc/delete-cust_credit.cgi | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/httemplate/misc/delete-cust_credit.cgi b/httemplate/misc/delete-cust_credit.cgi new file mode 100755 index 000000000..30de04d27 --- /dev/null +++ b/httemplate/misc/delete-cust_credit.cgi @@ -0,0 +1,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); + +%> |