#!/usr/bin/perl ############################################################################ # IT Development software # # European VAT number validator # # CGI interface Version 0.01 # # Copyright 2003 Nauwelaerts B bpn@it-development.be # # Created 06/08/2003 Last Modified 18/08/2008 # ############################################################################ # COPYRIGHT NOTICE # # Copyright 2003 Bernard Nauwelaerts All Rights Reserved. # # # # THIS SOFTWARE IS RELEASED UNDER THE GNU Public Licence # # See COPYING for details # # # # This software is provided as is, WITHOUT ANY WARRANTY, without even the # # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # # ############################################################################ # Revision history : # # # # 0.02 18/08/2008; Updated disclaimer URL # # 0.01 06/08/2003; # # # ############################################################################ use strict; use Business::Tax::VAT::Validation; use CGI qw/:standard/; print header, start_html('VAT checkup example'), h1('A simple VAT checkup example'); my $hvatn=Business::Tax::VAT::Validation->new(); if (param()) { my $vat=join("-",param('MS'),param('VAT')); print h2("Results"), $vat, ': '; if ($hvatn->check($vat)) { print 'Exists in database'; } else { print $hvatn->get_last_error; } } print hr, start_form, "VAT Number", p, popup_menu(-name=>'MS', -values=>[$hvatn->member_states]), textfield('VAT'),p, submit, end_form, hr, h2("Disclaimer"), "This interface is provided for demonstration purposes only, WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.", p, 'See also this disclaimer: http://ec.europa.eu/taxation_customs/vies/viesdisc.do?selectedLanguage=EN'; end_html; exit;