You are here

commerce_eu_vat_gr.module in Commerce European Union VAT 7.2

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

Code for the Commerce EU VAT GR feature.

File

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

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

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

/**
 * Implements hook_commerce_vat_rate_info().
 */
function commerce_eu_vat_gr_commerce_vat_rate_info() {
  $items = array(
    'gr_reduced' => array(
      'country' => 'GR',
      'eu' => TRUE,
      'title' => t('GR Reduced'),
      'rates' => array(
        '06_2015' => array(
          'name' => '06_2015',
          'rate' => 0.06,
          'start' => '20151001',
        ),
        '065_2011' => array(
          'name' => '065_2011',
          'rate' => 0.065,
          'start' => '20110101',
        ),
      ),
    ),
    'gr_intermediate' => array(
      'country' => 'GR',
      'eu' => TRUE,
      'title' => t('GR Intermediate'),
      'rates' => array(
        '13_2011' => array(
          'name' => '13_2011',
          'rate' => 0.13,
          'start' => '20110101',
        ),
      ),
    ),
    'gr_standard' => array(
      'country' => 'GR',
      'eu' => TRUE,
      'title' => t('GR Standard'),
      'rates' => array(
        '24_2016' => array(
          'name' => '24_2016',
          'rate' => 0.24,
          'start' => '20160601',
        ),
        '23_2010' => array(
          'name' => '23_2010',
          'rate' => 0.23,
          'start' => '20100701',
        ),
      ),
    ),
    'gr_islands_reduced' => array(
      'country' => 'GR',
      'eu' => TRUE,
      'title' => t('GR Islands Reduced'),
      'rates' => array(
        '04_2015' => array(
          'name' => '04_2015',
          'rate' => 0.04,
          'start' => '20151001',
        ),
        '05_2011' => array(
          'name' => '05_2011',
          'rate' => 0.05,
          'start' => '20110101',
        ),
      ),
    ),
    'eu_vat_gr_islands_intermediate' => array(
      'country' => 'GR',
      'eu' => TRUE,
      'title' => t('GR Islands Intermediate'),
      'rates' => array(
        '09_2011' => array(
          'name' => '09_2011',
          'rate' => 0.09,
          'start' => '20110101',
        ),
      ),
    ),
    'eu_vat_gr_islands_standard' => array(
      'country' => 'GR',
      'eu' => TRUE,
      'title' => t('GR Islands Standard'),
      'rates' => array(
        '16_2010' => array(
          'name' => '16_2010',
          'rate' => 0.16,
          'start' => '20100701',
        ),
      ),
    ),
  );
  return $items;
}