FIX #3349 Allow checking a VAT number with spaces
One of the first things I did, while starting to try Dolibarr, was to fill info about my company. I filled my VAT number : "FR 13 794..." and saw the "check" button. Oh, that's nice ! Click. Didn't work :( In fact, it didn't work because the webservice Dolibarr uses to check VAT numbers doesn't understand spaces. By doing this we could enter good looking VAT numbers (with spaces) and still check them.
This commit is contained in:
parent
1dac1932a9
commit
ef5d394b84
@ -49,8 +49,10 @@ if (! $_REQUEST["vatNumber"])
|
||||
}
|
||||
else
|
||||
{
|
||||
$_REQUEST["vatNumber"] = preg_replace('/\^\w/', '', $_REQUEST["vatNumber"]);
|
||||
$countryCode=substr($_REQUEST["vatNumber"],0,2);
|
||||
$vatNumber=substr($_REQUEST["vatNumber"],2);
|
||||
|
||||
print '<b>'.$langs->trans("Country").'</b>: '.$countryCode.'<br>';
|
||||
print '<b>'.$langs->trans("VATIntraShort").'</b>: '.$vatNumber.'<br>';
|
||||
print '<br>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user