You are here

function theme_invoice_body in Invoice 7

Same name and namespace in other branches
  1. 6 invoice.module \theme_invoice_body()

Theme function for displaying the invoice

2 theme calls to theme_invoice_body()
invoice_view in ./invoice.module
Implements hook_view()
_invoice_get_html in ./invoice_helpers.inc
Helper function to get the invoice in HTML format

File

./invoice.module, line 1120
Invoice module

Code

function theme_invoice_body($variables) {
  $node = $variables['node'];
  $type = $variables['type'];
  $content = '<div class="invoice-wrapper">';
  require_once dirname(__FILE__) . '/templates/' . $node->invoice['template'] . '.inc';
  drupal_add_css(drupal_get_path('module', 'invoice') . '/templates/' . $node->invoice['template'] . '.css');
  $content_function = '_invoice_' . $node->invoice['template'] . '_get_template_output';
  $content .= $content_function($node, $type);
  $content .= '</div>';
  return $content;
}