You are here

commerce_eu_vat_gb.module in Commerce European Union VAT 7.2

Same filename and directory in other branches
  1. 7 countries/commerce_eu_vat_gb/commerce_eu_vat_gb.module

Code for the Commerce EU VAT GB feature.

File

countries/commerce_eu_vat_gb/commerce_eu_vat_gb.module
View source
<?php

/**
 * @file
 * Code for the Commerce EU VAT GB feature.
 */

/**
 * Impliments hook_commerce_vat_country_info_alter().
 */
function commerce_eu_vat_gb_commerce_vat_country_info_alter(&$vat_countries) {
  $vat_countries['GB']['default_field'] = TRUE;
}

/**
 * Implements hook_commerce_vat_rate_info().
 */
function commerce_eu_vat_gb_commerce_vat_rate_info() {
  $items = array(
    'gb_reduced' => array(
      'country' => 'GB',
      'eu' => TRUE,
      'title' => t('GB Reduced'),
      'rates' => array(
        '05_1997' => array(
          'name' => '05_1997',
          'rate' => 0.05,
          'start' => '19970901',
        ),
      ),
    ),
    'gb_standard' => array(
      'country' => 'GB',
      'eu' => TRUE,
      'title' => t('GB Standard'),
      'rates' => array(
        '20_2011' => array(
          'name' => '20_2011',
          'rate' => 0.2,
          'start' => '20110104',
        ),
        '175_2010' => array(
          'name' => '175_2010',
          'rate' => 0.175,
          'start' => '20100101',
        ),
        '15_2008' => array(
          'name' => '15_2008',
          'rate' => 0.15,
          'start' => '20081201',
        ),
        '175_1991' => array(
          'name' => '175_1991',
          'rate' => 0.175,
          'start' => '19910319',
        ),
      ),
    ),
    'gb_zero' => array(
      'country' => 'GB',
      'eu' => TRUE,
      'title' => t('GB Zero'),
      'rates' => array(
        '00_1973' => array(
          'name' => '00_1973',
          'rate' => 0,
          'start' => '19730401',
        ),
      ),
    ),
  );
  return $items;
}