function _commerce_invoice_create in Commerce Invoice 7
Creation callback for the Entity module.
1 string reference to '_commerce_invoice_create'
- commerce_invoice_entity_info in ./
commerce_invoice.module - Implements hook_entity_info().
File
- ./
commerce_invoice.module, line 142 - Generates the invoice and allows you to display an invoice id in views
Code
function _commerce_invoice_create($values = array()) {
// Create a new invoice
$invoice = commerce_invoice_new();
$wrapper = entity_metadata_wrapper('commerce_invoice', $invoice);
return $wrapper
->value();
}