diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-02-05 15:16:12 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-02-05 15:16:12 -0600 |
commit | 9192ae1275e778f890d75c07066ddd2e4cabaa26 (patch) | |
tree | 5251db11c8c76b8cd45f84117e5fa57602ef7d0a /httemplate/misc/unapply-cust_pay_refund.cgi | |
parent | ff8a7535a81005b7c66e8e75e5cfa8449a8cef04 (diff) |
RT#39586 Manual check refunds cannot be unapplied
Diffstat (limited to 'httemplate/misc/unapply-cust_pay_refund.cgi')
-rwxr-xr-x | httemplate/misc/unapply-cust_pay_refund.cgi | 18 |
1 files changed, 18 insertions, 0 deletions
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; + +</%init> |