You are here

function commerce_tax_calculate_by_type in Commerce Core 7

Rules action: checks for the application of each tax rate of a certain type.

1 string reference to 'commerce_tax_calculate_by_type'
commerce_tax_default_rules_configuration in modules/tax/commerce_tax.rules_defaults.inc
Implements hook_default_rules_configuration().

File

modules/tax/commerce_tax.rules.inc, line 167
Rules integration for line items.

Code

function commerce_tax_calculate_by_type($line_item, $tax_type_name) {
  if ($tax_type = commerce_tax_type_load($tax_type_name)) {
    commerce_tax_type_calculate_rates($tax_type, $line_item);
  }
}