summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-eftca-upload
diff options
context:
space:
mode:
Diffstat (limited to 'FS/bin/freeside-eftca-upload')
-rwxr-xr-xFS/bin/freeside-eftca-upload4
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/bin/freeside-eftca-upload b/FS/bin/freeside-eftca-upload
index b66765af3..107aa19ce 100755
--- a/FS/bin/freeside-eftca-upload
+++ b/FS/bin/freeside-eftca-upload
@@ -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;