action.skip

How to set up tax rules for the Canary Islands?

← Billing & Invoice Management FAQ

The Spanish territories Canary Islands, Ceuta and Melilla are excluded from the VAT application. This is why the standard tax rules for EU businesses do not apply for sales to these areas.

So how to set up the tax rules and the region formula to cover the VAT exemption?

Summary

You use specific invoice regions for the Canary Islands, for example, IC, and for Ceuta and Melilla, for example, CM. Using dedicated tax rules, you set the tax rate to 0% for the invoice regions IC and CM.

To this end, you create specific tax rules and adjust the region formula to control the tax rules.

Creating Specific Tax Rules

To create new tax rules settings for the Canary Islands, Ceuta and Melilla:

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Tax Rules.

  3. Click New.
  4. Specify the details for each required tax rule as necessary, then click Save.

    # Name Business Entity Invoice Region Tax Rate VAT Category Code
    1 Canarias_0 business entity name IC 0% L
    4 Ceuta_Melilla_0 business entity name CM 0% M

    To comply with the requirements for possible electronic invoicing, JustOn recommends to add the relevant VAT category code to each tax rules setting.

    This produces the specific tax rules settings for the Canary Islands, Ceuta and Melilla.

Adjusting Region Formula

Assume you usually identify the region based on the account's billing country using the formula field ON_Region on the Account object. However, since the Canary Islands, Ceuta and Melilla do not hava a specific billing country code, you need another distinction criterion – in this case, the first two digits of the postal codes:

  • 35 and 38 for the Canary Islands
  • 51 for Ceuta
  • 52 for Melilla

To adjust the region formula:

  1. Click to enter Setup, then navigate to the fields list for the Account object.
  2. Open the ON_Region field, then click Edit.
  3. In the Formula Options section, adjust the region formula.

    Canary Islands, Ceuta and Melilla check

    This formula extends the country lookup for Spain, checking for Canary Islands, Ceuta and Melilla postal codes.

    IF(ISPICKVAL(BillingCountryCode,"DE"), "DE",
      IF(TEXT(BillingCountryCode) = "ES" &&
        OR(
          LEFT(BillingPostalCode,2) = "35",
          LEFT(BillingPostalCode,2) = "38"
        ),"IC",
        IF(TEXT(BillingCountryCode) = "ES" &&
          OR(
            LEFT(BillingPostalCode, 2) = "51",
            LEFT(BillingPostalCode, 2) = "52"
          ),"CM",
          IF(CASE(TEXT(BillingCountryCode),
              "ES","EU",
              "AT","EU",
              "BE","EU",
              "BG","EU",
              "CY","EU",
              "CZ","EU",
              "DK","EU",
              "EE","EU",
              "FI","EU",
              "FR","EU",
              "GR","EU",
              "HU","EU",
              "IE","EU",
              "IT","EU",
              "HR","EU",
              "LT","EU",
              "LU","EU",
              "LV","EU",
              "MT","EU",
              "NL","EU",
              "PL","EU",
              "PT","EU",
              "RO","EU",
              "SE","EU",
              "SI","EU",
              "SK","EU",
              "SM","EU",
              "NON-EU")
              = "NON-EU", "NON-EU",
              IF(ISBLANK(ONB2__TaxNumber__c), "EU", "RC")
          )
        )
      )
    )
    

    Based on the account's billing country (and postal code for Spain), this formula produces either DE, EU, IC, CM, RC or NON-EU as the value for the region.

  4. Click Save.

Related information:
Taxation and Customs Union | Territorial Scope