From fb95fe0606a2cb53ac7237e8ef2f503f2b61c43d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 May 2019 16:15:26 +0200 Subject: [PATCH] Check vat is not case sensitive --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 9e66d2fdfd0..79659e57750 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -577,7 +577,7 @@ function isValidVATID($company) $vatprefix = $company->country_code; if ($vatprefix == 'GR') $vatprefix = '(EL|GR)'; else $vatprefix = preg_quote($vatprefix, '/'); - if (! preg_match('/^'.$vatprefix.'[a-zA-Z0-9\-\.]{5,12}$/', str_replace(' ', '', $company->tva_intra))) + if (! preg_match('/^'.$vatprefix.'[a-zA-Z0-9\-\.]{5,12}$/i', str_replace(' ', '', $company->tva_intra))) { return 0; }