enable CardFortress in test database, #71513
[freeside.git] / FS / bin / freeside-eftca-upload
index b66765a..107aa19 100755 (executable)
@@ -47,6 +47,10 @@ foreach my $pay_batch (@batches) {
   my $filename = time2str('%Y%m%d', time) . '-' . sprintf('%06d.csv',$batchnum);
   print STDERR "Exporting batch $batchnum to $filename...\n" if $opt_v;
   my $text = $pay_batch->export_batch(format => 'eft_canada');
+  unless ($text) {
+    print STDERR "Batch is empty, resolving..." if $opt_v;
+    next;
+  }
   open OUT, ">$tmpdir/$filename";
   print OUT $text;
   close OUT;