- foreach my $invoice (@invoices) {
- my $part = $invoice->cust_bill->print_pdf({$invoice->options});
- die 'Failed creating PDF from invoice '.$invoice->invnum.'\n' if !$part;
+ foreach my $cust_bill_batch (@cust_bill_batch) {
+ my $part =
+ $cust_bill_batch->cust_bill->print_pdf({$cust_bill_batch->options});
+ die 'Failed creating PDF from invoice '.$cust_bill_batch->invnum.'\n'
+ if !$part;