You are here

function commerce_avatax_global_vat_settings_form in Drupal Commerce Connector for AvaTax 7.5

Builds the AvaTax Global VAT settings form.

1 string reference to 'commerce_avatax_global_vat_settings_form'
commerce_avatax_menu in ./commerce_avatax.module
Implements hook_menu().

File

includes/commerce_avatax.admin.inc, line 545
Administrative callbacks for the Commerce Avatax module.

Code

function commerce_avatax_global_vat_settings_form($form, &$form_state) {
  $form['global-vat'][COMMERCE_AVATAX_VAR_PREFIX . 'add_vat_field'] = array(
    '#title' => t('Allow customers to supply a VAT ID for tax-exemptions'),
    '#description' => t('Customers will be able to supply a VAT ID that will be submitted as their business identification number.'),
    '#type' => 'checkbox',
    '#default_value' => variable_get(COMMERCE_AVATAX_VAR_PREFIX . 'add_vat_field', FALSE),
  );
  $form['global-vat'][COMMERCE_AVATAX_VAR_PREFIX . 'vat_inclusive'] = array(
    '#title' => t('Prices entered are VAT-inclusive.'),
    '#type' => 'checkbox',
    '#default_value' => variable_get(COMMERCE_AVATAX_VAR_PREFIX . 'vat_inclusive', TRUE),
  );
  $form = system_settings_form($form);

  // This will call the install helper in order to refresh the fields.
  $form['#submit'][] = 'commerce_avatax_general_settings_form_submit';
  return $form;
}