You are here

function commerce_reports_tax_entity_insert in Commerce Reporting 7.4

Same name and namespace in other branches
  1. 7.3 modules/tax/commerce_reports_tax.module \commerce_reports_tax_entity_insert()

Implements hook_entity_insert().

File

modules/tax/commerce_reports_tax.module, line 153
Module file for Commerce Reports Tax.

Code

function commerce_reports_tax_entity_insert($entity, $type) {
  if ($type == 'commerce_order' && in_array($entity->status, variable_get('commerce_reports_tax_order_statuses', array(
    'pending',
    'processing',
    'completed',
  )))) {
    commerce_reports_tax_order_save($entity);
  }
}