diff options
author | ivan <ivan> | 2002-10-23 15:49:44 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-10-23 15:49:44 +0000 |
commit | 9f96bd19b87cb0084dda17da070f3bb5dadd4823 (patch) | |
tree | 1ddcad6839a1c5d899fa65a001ce279c3eaed423 /httemplate/misc | |
parent | b7440710b9bca319aba4d2782b8fdcf076abe2b7 (diff) |
add option to unapply payments
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-x | httemplate/misc/unapply-cust_pay.cgi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/httemplate/misc/unapply-cust_pay.cgi b/httemplate/misc/unapply-cust_pay.cgi new file mode 100755 index 000000000..28643ef6e --- /dev/null +++ b/httemplate/misc/unapply-cust_pay.cgi @@ -0,0 +1,18 @@ +<% + +#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; + +foreach my $cust_bill_pay ( $cust_pay->cust_bill_pay ) { + my $error = $cust_bill_pay->delete; + eidiot($error) if $error; +} + +print $cgi->redirect($p. "view/cust_main.cgi?". $custnum); + +%> |