From cb057e9c6db20b120fbebb0b11239cfb554904d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Jun 2019 12:32:14 +0200 Subject: [PATCH] NEW Add hidden option to be ready for BREXIT --- htdocs/core/lib/company.lib.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index c3b9bcec2cf..1e27cb112d3 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -649,6 +649,8 @@ function getFormeJuridiqueLabel($code) */ function getCountriesInEEC() { + global $conf; + // List of all country codes that are in europe for european vat rules // List found on http://ec.europa.eu/taxation_customs/common/faq/faq_1179_en.htm#9 $country_code_in_EEC=array( @@ -687,6 +689,12 @@ function getCountriesInEEC() //'CH', // Switzerland - No. Swizerland in not in EEC ); + if (! empty($conf->global->MAIN_COUNTRIES_IN_EEC)) + { + // For example MAIN_COUNTRIES_IN_EEC = 'AT,BE,BG,CY,CZ,DE,DK,EE,ES,FI,FR,GB,GR,HR,NL,HU,IE,IM,IT,LT,LU,LV,MC,MT,PL,PT,RO,SE,SK,SI,UK' + $country_code_in_EEC = explode(',', $conf->global->MAIN_COUNTRIES_IN_EEC); + } + return $country_code_in_EEC; }