2
0
forked from Wavyzz/dolibarr

Check vat is not case sensitive

This commit is contained in:
Laurent Destailleur
2019-05-22 16:15:26 +02:00
parent 20caf641bf
commit fb95fe0606

View File

@@ -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;
}