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_credit_refund.cgi | |
parent | ff8a7535a81005b7c66e8e75e5cfa8449a8cef04 (diff) |
RT#39586 Manual check refunds cannot be unapplied
Diffstat (limited to 'httemplate/misc/unapply-cust_credit_refund.cgi')
-rwxr-xr-x | httemplate/misc/unapply-cust_credit_refund.cgi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/httemplate/misc/unapply-cust_credit_refund.cgi b/httemplate/misc/unapply-cust_credit_refund.cgi new file mode 100755 index 000000000..55a81b055 --- /dev/null +++ b/httemplate/misc/unapply-cust_credit_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 credit'); + +#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->unapply_refund; +errorpage($error) if $error; + +</%init> |