Zum Inhalt springen

API reference / Quittio \ Core \ Countries

VatTerritory

final class in quittio/core

Quittio\Core\Countries\VatTerritory · Source

The EU VAT territory (Art. 5 to 7 of Directive 2006/112/EC) as far as it can be told from a country code and a postcode.

  • The 27 member states with their ISO 3166-1 codes (Greece is "GR"; "EL" is only the VAT prefix).
  • Northern Ireland belongs to it for goods only (Windsor Framework). It is recognised by the code "XI" and by United Kingdom addresses with a "BT" postcode.
  • Monaco is treated as France and the Isle of Man as the United Kingdom (Art. 7). Outside the EU, Liechtenstein is treated as Switzerland: both form one area of application of the VAT (treaty of 28 November 1994).
  • Territories excluded by Art. 6 are recognised by their postcode where it identifies them reliably: Büsingen am Hochrhein and Heligoland (DE, also not part of the German Inland under section 1 (2) UStG), the Canary Islands, Ceuta and Melilla (ES), Livigno and Campione d'Italia (IT), the Åland Islands (FI), Mount Athos (GR) and the French overseas territories (FR 97…, 98… except Monaco 980…). Excluded territories with own country codes (e.g. FO, GL, AX, IC) are outside anyway. Territories without a distinct postcode (e.g. the part of Cyprus not controlled by the government, the Italian waters of Lake Lugano) cannot be detected.

Constants#

ConstantValueDescription
EU_MEMBER_STATES['AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GR', 'HR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK …
NORTHERN_IRELAND'XI'Northern Ireland: part of the EU VAT area for goods (Windsor Framework).

Methods#

MethodDescription
::excludedTerritory()Name of the territory excluded from the EU VAT territory that the address lies in, or null.
::isEuMemberState()
::isEuVatTerritory()Whether an address lies in the EU VAT territory.
::isNorthernIreland()Northern Ireland: the code "XI" or a United Kingdom address with a "BT" postcode.
::memberState()The member state (or "XI" for Northern Ireland and goods) of an address in the EU VAT territory, null outside of it.
::memberStateOfVatId()The member state of a VAT identifier prefix (EL → GR, XI stays XI), or null if the prefix does not belong to the EU VAT area.
::sameVatTerritory()Whether two addresses lie in the same VAT territory (the same country and both inside or both outside its excluded territories), e.g. FR and MC, but not DE and Büsingen.
::vatCountry()The country whose VAT territory the given country belongs to (MC → FR, IM → GB, EL → GR, LI → CH).

excludedTerritory()#

public static function excludedTerritory(string $country, ?string $postcode): ?string

static

Name of the territory excluded from the EU VAT territory that the address lies in, or null.

ParameterTypeDescription
$countrystring
$postcode?string
Returns
?string

isEuMemberState()#

public static function isEuMemberState(string $country): bool

static

ParameterTypeDescription
$countrystring
Returns
bool

isEuVatTerritory()#

public static function isEuVatTerritory(
    string $country,
    ?string $postcode = null,
    bool $goods = true,
): bool

static

Whether an address lies in the EU VAT territory.

ParameterTypeDescription
$countrystring
$postcode?string = null
$goodsbool = trueNorthern Ireland counts for supplies of goods only
Returns
bool

isNorthernIreland()#

public static function isNorthernIreland(string $country, ?string $postcode = null): bool

static

Northern Ireland: the code "XI" or a United Kingdom address with a "BT" postcode.

ParameterTypeDescription
$countrystring
$postcode?string = null
Returns
bool

memberState()#

public static function memberState(
    string $country,
    ?string $postcode = null,
    bool $goods = true,
): ?string

static

The member state (or "XI" for Northern Ireland and goods) of an address in the EU VAT territory, null outside of it.

ParameterTypeDescription
$countrystring
$postcode?string = null
$goodsbool = true
Returns
?string

memberStateOfVatId()#

public static function memberStateOfVatId(string $vatId): ?string

static

The member state of a VAT identifier prefix (EL → GR, XI stays XI), or null if the prefix does not belong to the EU VAT area.

ParameterTypeDescription
$vatIdstring
Returns
?string

sameVatTerritory()#

public static function sameVatTerritory(
    string $country,
    ?string $postcode,
    string $otherCountry,
    ?string $otherPostcode,
): bool

static

Whether two addresses lie in the same VAT territory (the same country and both inside or both outside its excluded territories), e.g. FR and MC, but not DE and Büsingen.

ParameterTypeDescription
$countrystring
$postcode?string
$otherCountrystring
$otherPostcode?string
Returns
bool

vatCountry()#

public static function vatCountry(string $country): string

static

The country whose VAT territory the given country belongs to (MC → FR, IM → GB, EL → GR, LI → CH).

ParameterTypeDescription
$countrystring
Returns
string

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.