You are here

function invoice_view in Invoice 6

Same name and namespace in other branches
  1. 7 invoice.module \invoice_view()

Implementation of hook_view()

File

./invoice.module, line 769
Invoice module

Code

function invoice_view($node, $teaser = FALSE, $page = FALSE) {
  $node->content['body'] = array(
    '#value' => '<div class="view">' . theme('invoice_body', $node, 'view') . '</div>',
    '#weight' => 0,
  );
  $links = '<div class="invoice-links">';
  $links .= _invoice_get_icon('pdf', 'invoice/pdf/' . $node->invoice['invoice_number'], array(
    'width' => '30',
    'height' => '30',
  ), 'jpg');
  $links .= _invoice_get_icon('print', 'invoice/print/' . $node->invoice['invoice_number'], array(
    'width' => '30',
    'height' => '30',
  ), 'jpg');
  $links .= '</div>';
  $node->content['invoice_links'] = array(
    '#value' => $links,
    '#weight' => 1,
  );
  return $node;
}