Documentation ¶
Overview ¶
Package countries contains European countries and their VAT rates from an European Union point of view.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func InEuropeanUnion ¶
Types ¶
type Country ¶
type Country string // ISO 3166-1 code
const ( // European Union AT Country = "AT" BE Country = "BE" BG Country = "BG" CY Country = "CY" CZ Country = "CZ" DE Country = "DE" DK Country = "DK" EE Country = "EE" ES Country = "ES" FI Country = "FI" FR Country = "FR" GR Country = "GR" HR Country = "HR" HU Country = "HU" IE Country = "IE" IT Country = "IT" LT Country = "LT" LU Country = "LU" LV Country = "LV" MT Country = "MT" NL Country = "NL" PL Country = "PL" PT Country = "PT" RO Country = "RO" SE Country = "SE" SI Country = "SI" SK Country = "SK" NonEU Country = "non-EU" // selected Non-EU countries CH Country = "CH" GB Country = "GB" ME Country = "ME" )
func (Country) VAT ¶
VAT rates are from: https://europa.eu/youreurope/business/taxation/vat/vat-rules-rates/index_en.htm#shortcut-5. Note that the ISO 3166-1 code for Greece is "GR", but the VAT rate table uses its ISO 639-1 code "EL".
type CountryWithName ¶
func TranslateAndSort ¶
func TranslateAndSort(l lang.Lang, countries []Country) []CountryWithName
type VATRates ¶
func (VATRates) Gross ¶
Gross returns the gross of the given net amount using the given VAT rate key. The boolean return value indicates if the rate has been found. If it is not found, the maximum rate is used.
Directories ¶
Path | Synopsis |
---|---|
Package detect detects a customer's country options based on their Accept-Language and IP address.
|
Package detect detects a customer's country options based on their Accept-Language and IP address. |
Command print-rates prints the VAT rates of European Union countries in a format similar to https://europa.eu/youreurope/business/taxation/vat/vat-rules-rates/index_en.htm#shortcut-5 so we can easily diff it.
|
Command print-rates prints the VAT rates of European Union countries in a format similar to https://europa.eu/youreurope/business/taxation/vat/vat-rules-rates/index_en.htm#shortcut-5 so we can easily diff it. |
Click to show internal directories.
Click to hide internal directories.