driesvints / vat-calculator

Handle all the hard stuff related to EU MOSS tax/vat regulations, the way it should be.
MIT License
1.2k stars 88 forks source link

VAT Number not UE #17

Closed nacr closed 8 years ago

nacr commented 8 years ago

This is a question not a issue, what will be the behavior of vat validation if we try to validate a vat number that is not UE?

Tks

mpociot commented 8 years ago

The validation will fail, because it uses a SOAP service provided by the EU, which can only validate european VAT IDs.

nacr commented 8 years ago

So in that case the form validation will fail correct?

So it would be interesting to verify if the $countryCode is present in $taxRules and then respond accordingly?

mpociot commented 8 years ago

Yeah right. I think the best (and to my knowledge) most common solution is to only give the ability to enter a VAT ID when the selected country is in the EU.

mpociot commented 8 years ago

I just updated the package to provide a new method shouldCollectVAT($countryCode).

You can use this method to see if you need to collect taxes for the given country code.

nacr commented 8 years ago

Cool m:8ball: tks :+1: