ePages 6.0 Patch 8 - DE_EPAGES/Address/API/Address.pm

Package DE_EPAGES::Address::API::Address

This module includes a function to check VATID

@EXPORT_OK
CheckVATID
UpdateVATID

Functions

CheckVATID
UpdateVATID

CheckVATID

returns 1 if country is not eu country returns 1 if VATID is valid returns -1 if CountryID and country VATID not same returns 0 if VATID is not valid

Syntax
$check = CheckVATID( $VATID, $CountryID );
Input
$VATID (string)
VATID
$CountryID (int)
country id (optional)
Return
$check (int)
valid

UpdateVATID

Adds the country code to the VATID if $CountryID is defined and the country is a member of the European Union.

Syntax
$LocalVATID = UpdateVATID( $VATID, $CountryID );
Example
$LocalVATID = UpdateVATID( '118541153', 276 );
Input
$VATID (string)
VATID
$CountryID (int)
country id
Return
$LocalVATID (string)
VAT ID including country code, e.g. "DE118541153"