Hi,
if someone enters only spaces into the tax id field, the check passes, but the customer is treated as having a VAT ID.
The problem is the trim before checking if the tax id field is empty in check_tax_for_EU.php.
A possible fix looks like this:
(from line 14):
public function onBeforeSaveCheckoutStep2(&$adv_user) {
$taxNumber = strval($adv_user->tax_number);
if (strlen($taxNumber) <= 0) {
return NULL;
}
$taxNumber = trim($taxNumber);
$taxNumber = strval($adv_user->tax_number);
if (strlen($taxNumber) <= 0) {
return NULL;
}
$taxNumber = trim($taxNumber);
Would be great if this could be implemented in a future version so that my own fix isn't reverted.
Thanks,
Aron