diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-12-22 00:28:53 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-12-22 00:28:53 -0600 |
commit | 1259a17db297fa2352619b29f2c5bd34e313cd64 (patch) | |
tree | 644f9c30e6eb1a470f671afb8a3f9971d6bb7302 /FS/bin/freeside-rbc-upload | |
parent | 38444ef88b5e93aa9aa724369ae8fe17c97fa480 (diff) |
RT#34295: Error when attempting to create batch payments [better handling of empty batches]
Diffstat (limited to 'FS/bin/freeside-rbc-upload')
-rwxr-xr-x | FS/bin/freeside-rbc-upload | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/bin/freeside-rbc-upload b/FS/bin/freeside-rbc-upload index 52501028c..3fff32a67 100755 --- a/FS/bin/freeside-rbc-upload +++ b/FS/bin/freeside-rbc-upload @@ -70,6 +70,10 @@ foreach my $pay_batch (@batches) { debug "Exporting batch $batchnum to $filename\n"; my $text = $pay_batch->export_batch(format => 'RBC'); + unless ($text) { + print STDERR "Batch is empty, resolving..." if $opt_v; + next; + } write_file("$tmpdir/$filename", $text); debug "Uploading $filename..."; |