summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-03-10 19:12:20 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-03-11 09:14:22 -0400
commit6f08493827f30fe18fd99c32bbb1625b064017ec (patch)
tree4019237f1655cdf5f41fa38dc34e780c5265b700 /httemplate/edit
parent59b1fe7b375932fc13c920eb6f02b8da61d4c8fe (diff)
RT# 82988 - Fixed so only formats that can handle electronic refunds can download those files
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-xhttemplate/edit/process/cust_refund.cgi2
1 files changed, 2 insertions, 0 deletions
diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi
index 9175eb136..25f6e00a1 100755
--- a/httemplate/edit/process/cust_refund.cgi
+++ b/httemplate/edit/process/cust_refund.cgi
@@ -39,6 +39,8 @@ $cgi->param('reasonnum') =~ /^(-?\d+)$/ or die "Illegal reasonnum";
my ($reasonnum, $error) = $m->comp('/misc/process/elements/reason');
$cgi->param('reasonnum', $reasonnum) unless $error;
+$error = "No batch download format configured that allows electronic refunds" unless (FS::pay_batch->can_handle_electronic_refunds && !$error);
+
if ( $error ) {
# do nothing
} elsif ( $payby =~ /^(CARD|CHEK)$/ ) {