From 9192ae1275e778f890d75c07066ddd2e4cabaa26 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Fri, 5 Feb 2016 15:16:12 -0600 Subject: RT#39586 Manual check refunds cannot be unapplied --- httemplate/misc/unapply-cust_pay_refund.cgi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 httemplate/misc/unapply-cust_pay_refund.cgi (limited to 'httemplate/misc/unapply-cust_pay_refund.cgi') diff --git a/httemplate/misc/unapply-cust_pay_refund.cgi b/httemplate/misc/unapply-cust_pay_refund.cgi new file mode 100755 index 000000000..9e470b6e4 --- /dev/null +++ b/httemplate/misc/unapply-cust_pay_refund.cgi @@ -0,0 +1,18 @@ +<% $cgi->redirect($p. "view/cust_main.cgi?custnum=". $custnum. ";show=payment_history") %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Unapply payment'); + +#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->unapply_refund; +errorpage($error) if $error; + + -- cgit v1.2.1