View Issue Details

IDProjectCategoryView StatusLast Update
0004212OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2014-04-23 10:16
Reporterd3 Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Target Version4.8.5 / 5.1.5Fixed in Version4.8.5 / 5.1.5 
Summary0004212: Valid USTID-Numbers are considered incorrect
DescriptionThe prefix from the number is not an ISO-Alpha2.
Especially for Greece: the prefix is "EL" but the ISO-Code is "GR".
So every check for an USTID from Greece return an failure.

Additional InformationA solution is not to change the ISO-Code, because some modules use the code. Maybe a new field "oxustidprefix" can change this.
TagsCountry, VAT
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Relationships

related to 0004881 resolvedLinas Kukulskis wrong VAT-ID does not show error to user in frontend 

Activities

Linas Kukulskis

2012-12-13 13:46

reporter   ~0008124

in oxcountry table ISO-Alpha2 is GR for Greece

d3

2013-01-16 15:46

reporter   ~0008283

The ISO-Alpha2 for Greece is GR.
But that VAT identification number for Greece start wie ELXXXXX.
http://en.wikipedia.org/wiki/VAT_identification_number



So every check for an USTID from Greece return an failure.

Linas Kukulskis

2013-01-17 08:44

reporter   ~0008284

Reminder sent to: d3

do you mean that oxonlinevatidcheck::checkUid( 'EL....') returns false?

it should not, because:
$oCheckVat = new stdClass();
        $oCheckVat->countryCode = substr( $sCompVatId, 0, 2);
        $oCheckVat->vatNumber = substr( $sCompVatId, 2);

it extract abbreviation from companyvatID, it does not used country ISO-Alpha2 code

d3

2013-01-17 09:27

reporter   ~0008286

no, it's in
oxinputvalidator::checkVatId() (4.7.2)

if ( strncmp( $aInvAddress['oxuser__oxustid'], $oCountry->oxcountry__oxisoalpha2->value, 2 ) ) {
...
}

in this case the oxisoalpha2 for Greece is "GR", but that VAT identification number for Greece start with ELXXXXX.


Greece is that on special case ;-)

ray

2013-01-29 23:37

reporter   ~0008352

Last edited: 2013-01-30 21:46

additionally a forum-user reported, that Azure does not show an error notice to the user when inserting a defenitely wrong VAT-ID into invoice-address while checkout

http://forum.oxid-esales.com/showthread.php?p=114827#post114827

try in demoshop with account admin|admin and insert xy-1234567 into VAT-ID-field of invoice-adress

opened a separate bug-entry for this issue: 0004881

d3

2014-02-25 09:22

reporter   ~0009595

That problem still exist.

mantas.vaitkunas

2014-03-06 17:16

reporter   ~0009614

Last edited: 2014-03-06 17:17

Fixed:
added getVATIdentificationNumberPrefix method to oxcountry class, which is used in oxInputValidator class:
if ( strncmp( $aInvAddress['oxuser__oxustid'], $oCountry->getVATIdentificationNumberPrefix(), 2 ) ) {
...
}