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);
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);