You are here

function commerce_invoice_views_data_alter in Commerce Invoice 7

Same name and namespace in other branches
  1. 8.2 commerce_invoice.module \commerce_invoice_views_data_alter()

Implements hook_views_data_alter()

File

includes/views/commerce_invoice.views.inc, line 149

Code

function commerce_invoice_views_data_alter(&$data) {
  $data['commerce_order']['invoice_id'] = array(
    'title' => t('Invoice id'),
    'help' => t('The invoice id associated with this order.'),
    'relationship' => array(
      'title' => t('Invoice'),
      'help' => t("Relate this order to its invoice"),
      'handler' => 'views_handler_relationship',
      'base' => 'commerce_invoice',
      'base field' => 'order_id',
      'relationship field' => 'order_id',
      'field' => 'order_id',
      'label' => t('Invoice associated to the order'),
    ),
  );
}