From 1667ab631f9fbd0f4ceeb6ec000b0f4ff3ddb51a Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Tue, 22 Dec 2015 00:28:53 -0600 Subject: RT#34295: Error when attempting to create batch payments [better handling of empty batches] --- FS/bin/freeside-rbc-upload | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'FS/bin/freeside-rbc-upload') 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..."; -- cgit v1.2.1