From 4021a65b46491615b8577335ab93d4a2eab34c46 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Fri, 15 Mar 2019 11:29:50 -0400 Subject: RT# 83044 - fixed cc refund issues Conflicts: httemplate/edit/process/cust_refund.cgi httemplate/misc/download-batch.cgi --- httemplate/edit/process/cust_refund.cgi | 2 +- httemplate/misc/download-batch.cgi | 5 ----- httemplate/search/elements/cust_pay_batch_top.html | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'httemplate') diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi index 3a175ea35..89994eb30 100755 --- a/httemplate/edit/process/cust_refund.cgi +++ b/httemplate/edit/process/cust_refund.cgi @@ -55,7 +55,7 @@ if ( $error ) { 'CHEK' => 'electronic check (ACH)', ); -my( $cust_pay, $cust_payby, $payinfo, $paycvv, $month, $year, $payname ); +my( $cust_pay, $cust_payby, $payinfo, $paycvv, $month, $year, $payname, $paycardtype ); my $paymask = ''; ## get cust pay info if paynum exists diff --git a/httemplate/misc/download-batch.cgi b/httemplate/misc/download-batch.cgi index 5db563a43..c59ba9d37 100644 --- a/httemplate/misc/download-batch.cgi +++ b/httemplate/misc/download-batch.cgi @@ -28,9 +28,4 @@ my $pay_batch = qsearchs({ 'select' => "*, $credit_transactions", }); die "Batch not found: '$batchnum'" if !$pay_batch; -if ($pay_batch->{Hash}->{arecredits}) { - my $export_format = "FS::pay_batch::".$opt{'format'}; - die "You are trying to download a credit (batch refund) batch and The format ".$opt{'format'}." can not handle refunds.\n" unless $export_format->can('can_handle_credits'); -} - diff --git a/httemplate/search/elements/cust_pay_batch_top.html b/httemplate/search/elements/cust_pay_batch_top.html index 90fc9e449..d29e487b2 100644 --- a/httemplate/search/elements/cust_pay_batch_top.html +++ b/httemplate/search/elements/cust_pay_batch_top.html @@ -146,7 +146,7 @@ tie my %upload_formats, 'Tie::IxHash', ( delete $upload_formats{'td_eft1464'}; $upload_formats{'PAP'} = '264 byte results for TD Canada Trust PAP Batch'; -if ($pay_batch->type eq "CREDIT") { +if ($pay_batch->type eq "CREDIT" && $pay_batch->payby eq "CHEK") { 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 -- cgit v1.2.1