vat
vat copied to clipboard
PHP library for dealing with European VAT
So firstly, I just noticed that the standard geoip-service, ip2c.org, doesn't support IPv6. That, combined with the fact that the ip2country.info service is only for open source projects, might create...
I have no clue how all this VAT stuff works, that's why I'm using `mpociot/vat-calculator` at the moment. I saw that the other package has exceptions for cities: https://github.com/mpociot/vat-calculator/blob/master/src/Mpociot/VatCalculator/VatCalculator.php#L34 I...
Format
By giving a country code and business id, a function could return a VAT ID formatted to international format. Examples: format('FI', '1234567-1') would return FI12345671 format('SE', '556697-6009') would return SE556697600901
Closes https://github.com/ibericode/vat/issues/40 cc @gemal @dannyvankooten The option doesn't make sens for validateVatNumber, since the `validateVatNumberExistence` only work for EU country since the check is done on https://ec.europa.eu/taxation_customs/vies/#/vat-validation
add RU/RS/BY/TR validators. see https://en.wikipedia.org/wiki/VAT_identification_number#VAT_numbers_by_country
With `ip2country.info` dead, we need more implementations of `Ibericode\Vat\Geolocation\GeolocatorInterface`. [Ibericode\Vat\Geolocation\IP2C](https://github.com/ibericode/vat/blob/master/src/Geolocation/IP2C.php) is an example implementation. Happy to accept PR's for this!
This is a valid Spain VAT Number recording to MIAS: B57391567 (https://ec.europa.eu/taxation_customs/vies/#/vat-validation) Since the validator checks for ISO-3316 alpha-2 country codes, it always fails.
The regex for Northern Ireland (XI) is missing. See question 11: https://ec.europa.eu/taxation_customs/vies/#/faq