summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-rbc-upload
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-12-22 00:28:53 -0600
committerJonathan Prykop <jonathan@freeside.biz>2016-01-05 21:06:41 -0600
commit1667ab631f9fbd0f4ceeb6ec000b0f4ff3ddb51a (patch)
treef1fae9a3e8f6a01782a45528c04e6e9d9ded749a /FS/bin/freeside-rbc-upload
parent9088495eea6c836c7086dec1e76839ed8e93e0be (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-xFS/bin/freeside-rbc-upload4
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...";