You are here

function uc_order_action_print in Ubercart 7.3

Action implementation: prints multiple invoices.

File

uc_order/uc_order.module, line 2410

Code

function uc_order_action_print($orders, $context = array()) {
  $output = '';
  foreach ($orders as $order) {
    $output .= '<div style="page-break-after: always;">';
    $output .= theme('uc_order', array(
      'order' => $order,
      'op' => 'print',
      'template' => variable_get('uc_cust_order_invoice_template', 'customer'),
    ));
    $output .= '</div>';
  }
  print '<html><head><title>Invoice</title></head>';
  print '<body onload="print();">';
  print $output;
  print '</body></html>';
  exit;
}