@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;