@batches = qsearch('pay_batch', \%criteria);
die "No open batches found".($opt_p ? " of type '$opt_p'" : '').".\n"
if !@batches;
@batches = qsearch('pay_batch', \%criteria);
die "No open batches found".($opt_p ? " of type '$opt_p'" : '').".\n"
if !@batches;
debug "Exporting batch $batchnum to $filename\n";
my $text = $pay_batch->export_batch(format => 'RBC');
debug "Exporting batch $batchnum to $filename\n";
my $text = $pay_batch->export_batch(format => 'RBC');
write_file("$tmpdir/$filename", $text);
debug "Uploading $filename...";
write_file("$tmpdir/$filename", $text);
debug "Uploading $filename...";