You are here

function uc_order_invoice in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_order/uc_order.admin.inc \uc_order_invoice()

Display an invoice in the browser, convert it to PDF, or e-mail it as HTML.

1 string reference to 'uc_order_invoice'
uc_order_menu in uc_order/uc_order.module
Implementation of hook_menu().

File

uc_order/uc_order.module, line 2030

Code

function uc_order_invoice($order_id, $op = 'view') {
  $order = uc_order_load($order_id);
  if ($order === FALSE) {
    drupal_set_message(t('Order @order_id does not exist.', array(
      '@order_id' => $order_id,
    )));
    drupal_goto('admin/store/orders');
  }
  $output = uc_order_load_invoice($order, $op, variable_get('uc_cust_order_invoice_template', 'customer'));
  if ($op == 'print') {
    print $output;
    exit;
  }
  return $output;
}