NAME
Business::Tax::VAT::Validation - A class for european VAT numbers validation.
SYNOPSIS
use Business::Tax::VAT::Validation;
my $hvatn=Business::Tax::VAT::Validation->new();
# Check number
if ($hvatn->check($VAT, [$member_state])){
print "OK\n";
} else {
print $hvatn->get_last_error;
}
DESCRIPTION
This class provides you a easy api to check validity of european VAT numbers (if the provided number exists).
It asks the EU database for this.
METHODS
- new Class constructor.
-
$hvatn=Business::Tax::VAT::Validation->new();
- check - Checks if a client have access to this document
-
$ok=$hvatn->check($VAT, [$member_state]);
You may either provide the VAT number under his complete form (e.g. BE-123456789, BE123456789 or BE 123 456 789) or specify VAT and MS (member state) individually.
Valid MS values are :
AT, BE, DE, DK, EL, ES, FI, FR, GB, IE, IT, LU, NL, PT, SE
- get_last_error - Returns last recorded error
-
$hvatn->get_last_error();
Possible errors are :
- Invalid VAT number (1) : Internal checkup failed (formal) - Invalid MS code (1) : Internal checkup failed - This VAT number doesn't exists in EU database : distant checkup - This VAT number contains errors : distant checkup - Invalid response, please contact the author of this module. : This only happens if this software doesn't recognize any valid pattern into the response document: this generally means that the database interface has been modified.
Other documentation
Jetez un oeil sur http://www.it-development.be/software/PERL/Business-Tax-VAT-Validation/ pour la documentation en français.
Feedback
If you find this module useful, or have any comments, suggestions or improvements, please let me know.
AUTHOR
Bernard Nauwelaerts <bpn@it-development.be>
LICENSE
GPL. Enjoy ! See COPYING for further informations on the GPL.
Disclaimer
See http://europa.eu.int/comm/taxation_customs/vies/en/viesdisc.htm to known the limitations of the EU service.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 145:
You forgot a '=back' before '=head1'
- Around line 147:
Non-ASCII character seen before =encoding in 'français.'. Assuming UTF-8