Merge pull request #3350 from tomours/develop
FIX #3349 Checking a VAT number with spaces
This commit is contained in:
commit
4a124c6ee9
@ -410,6 +410,7 @@ class DoliDBPgsql extends DoliDB
|
|||||||
$this->database_name = $name;
|
$this->database_name = $name;
|
||||||
pg_set_error_verbosity($this->db, PGSQL_ERRORS_VERBOSE); // Set verbosity to max
|
pg_set_error_verbosity($this->db, PGSQL_ERRORS_VERBOSE); // Set verbosity to max
|
||||||
}
|
}
|
||||||
|
pg_query($this->db, "set datestyle = 'ISO, YMD';");
|
||||||
|
|
||||||
return $this->db;
|
return $this->db;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,8 +49,10 @@ if (! $_REQUEST["vatNumber"])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$_REQUEST["vatNumber"] = preg_replace('/\^\w/', '', $_REQUEST["vatNumber"]);
|
||||||
$countryCode=substr($_REQUEST["vatNumber"],0,2);
|
$countryCode=substr($_REQUEST["vatNumber"],0,2);
|
||||||
$vatNumber=substr($_REQUEST["vatNumber"],2);
|
$vatNumber=substr($_REQUEST["vatNumber"],2);
|
||||||
|
|
||||||
print '<b>'.$langs->trans("Country").'</b>: '.$countryCode.'<br>';
|
print '<b>'.$langs->trans("Country").'</b>: '.$countryCode.'<br>';
|
||||||
print '<b>'.$langs->trans("VATIntraShort").'</b>: '.$vatNumber.'<br>';
|
print '<b>'.$langs->trans("VATIntraShort").'</b>: '.$vatNumber.'<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user