summaryrefslogtreecommitdiff
path: root/httemplate/misc/delete-cust_pay.cgi
diff options
context:
space:
mode:
authorivan <ivan>2002-02-07 22:29:35 +0000
committerivan <ivan>2002-02-07 22:29:35 +0000
commit69c6e80a7253f927af1780a3e0dd3fcf50110599 (patch)
tree43d1c9acd2974702d2df85acdf472f34884ffba3 /httemplate/misc/delete-cust_pay.cgi
parent88d4198ff452581be05e3018b3e23db564545525 (diff)
delete payments
Diffstat (limited to 'httemplate/misc/delete-cust_pay.cgi')
-rwxr-xr-xhttemplate/misc/delete-cust_pay.cgi17
1 files changed, 17 insertions, 0 deletions
diff --git a/httemplate/misc/delete-cust_pay.cgi b/httemplate/misc/delete-cust_pay.cgi
new file mode 100755
index 000000000..3fb786d7d
--- /dev/null
+++ b/httemplate/misc/delete-cust_pay.cgi
@@ -0,0 +1,17 @@
+<!-- $Id: delete-cust_pay.cgi,v 1.1 2002-02-07 22:29:35 ivan Exp $ -->
+<%
+
+#untaint paynum
+my($query) = $cgi->keywords;
+$query =~ /^(\d+)$/ || die "Illegal paynum";
+my $paynum = $1;
+
+my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum});
+my $custnum = $cust_pay->custnum;
+
+my $error = $cust_pay->delete;
+eidiot($error) if $error;
+
+print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+
+%>