You are here

function commerce_invoice_access in Commerce Invoice 7

Same name and namespace in other branches
  1. 7.2 commerce_invoice.module \commerce_invoice_access()

Checks invoice access for various operations.

Parameters

$op: The operation being performed. One of 'view', 'update', 'create' or 'delete'.

$invoice: Optionally an invoice to check access for.

$account: The user to check for. Leave it to NULL to check for the current user.

1 call to commerce_invoice_access()
commerce_invoice_ui_access_by_order in ./commerce_invoice_ui.module
Checks invoice access based on order id.
2 string references to 'commerce_invoice_access'
commerce_invoice_entity_info in ./commerce_invoice.module
Implements hook_entity_info().
commerce_invoice_ui_menu in ./commerce_invoice_ui.module
Implements hook_menu().

File

./commerce_invoice.module, line 201
Generates the invoice and allows you to display an invoice id in views

Code

function commerce_invoice_access($op, $invoice = NULL, $account = NULL) {
  return commerce_entity_access($op, $invoice, $account, 'commerce_invoice');
}