summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-03-13 09:17:02 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-03-13 09:24:03 -0400
commit30ec7432f51aad8bf7bf1cf4281d40d10c86139c (patch)
tree659105ff480d4859a4605ca4379760628b5f071f /httemplate/search
parent094554b463612e5af4396d5a0fa0cba8e66a11be (diff)
RT# 82988 - updated paybatch upgrade to move credits from combined batch file to credit batch file
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/elements/cust_pay_batch_top.html4
-rwxr-xr-xhttemplate/search/pay_batch.cgi6
2 files changed, 8 insertions, 2 deletions
diff --git a/httemplate/search/elements/cust_pay_batch_top.html b/httemplate/search/elements/cust_pay_batch_top.html
index eee81dd5b..90fc9e449 100644
--- a/httemplate/search/elements/cust_pay_batch_top.html
+++ b/httemplate/search/elements/cust_pay_batch_top.html
@@ -149,6 +149,10 @@ $upload_formats{'PAP'} = '264 byte results for TD Canada Trust PAP Batch';
if ($pay_batch->type eq "CREDIT") {
foreach my $key (keys %download_formats) {
delete $download_formats{$key} unless FS::pay_batch->can_handle_electronic_refunds($key);
+ ## remove default format if unable to handle electronic refunds
+ if ($key eq '') {
+ delete $download_formats{$key} unless FS::pay_batch->can_handle_electronic_refunds($conf->config("batch-default_format"));
+ }
}
}
diff --git a/httemplate/search/pay_batch.cgi b/httemplate/search/pay_batch.cgi
index 8fe435132..fd14d05bc 100755
--- a/httemplate/search/pay_batch.cgi
+++ b/httemplate/search/pay_batch.cgi
@@ -43,8 +43,10 @@
my $_date = $self->download;
if ( $_date ) {
time2str("%a %b %e %T %Y", $_date);
- } elsif ( $self->status eq 'O' ) {
- 'Download batch';
+ } elsif ( $self->status eq 'O' && $self->type eq 'CREDIT') {
+ 'Download credit batch';
+ } elsif ( $self->status eq 'O' && $self->type eq 'DEBIT') {
+ 'Download batch';
} else {
'';
}