iconfinder / pyvat

VAT validation for Python
Other
66 stars 29 forks source link

GB no longer in EU issues #36

Closed stephenomalley closed 3 years ago

stephenomalley commented 3 years ago

Not sure if this is intended behaviour, but with the UK leaving the EU and the recent changes using the PyVAT to check for vat numbers in the GB now throws and error:

NotImplementedError: cannot determine VAT charge for a sale of item <ItemType.generic_electronic_service: 2> between <pyvat.Party: country code = GB, is business = True> and <pyvat.Party: country code = GB, is business = True>

This is with Pyvat v1.3.7.

Is the library no longer supporting GB vat?

martinleblanc commented 3 years ago

We removed GB from the EU VAT list in the latest release. I'm not sure why it fails with the NotImplementedError. We'll check that. Perhaps you can set your code to use version 1.3.6? I'm sorry about the trouble.

stephenomalley commented 3 years ago

Yeah we've pinned to version 1.3.6. The trouble with the last change was while GB is no longer in the EU it still should have VAT rules in https://github.com/iconfinder/pyvat/blob/master/pyvat/vat_rules.py#L347. In the meantime https://github.com/iconfinder/pyvat/blob/master/pyvat/__init__.py#L215 will always fail for GB as there is no VAT rules so the method always raises the error at the end.

However, even with version 1.3.6 I doubt the vat number verification will work as it is no longer in the vies registry. I guess if the library is only for EU then that is fine but just thought I'd mention this in case it should have also supported the GB.

JanmanX commented 3 years ago

Hi @stephenomalley,

At the moment, we are not going to support GB, as it is now outside of EU, and the VIES registry will no longer have it implemented.

We appreciate you taking your time notifying us though :)