VIES VAT number validation

235 views
Skip to first unread message

Leszek Bober

unread,
Nov 17, 2020, 6:04:39 AM11/17/20
to iDempiere
Hi All
Does anyone have a plugin that works with VIES?

If so, please let me know. I want to buy plugin or sponsor development.

Regards
Leszek Bober

Marco Longo

unread,
Nov 17, 2020, 6:41:40 AM11/17/20
to iDempiere
Hi Leszek,

yes we have :-)  You can create a BP from  VAT Numbert gathering info from VIES
we also created a Process to validate BP  if they changed asome info.
We create also a Table to save VIES DATA

We don't  need pay development as it is already done. You may sponsor test time and time to make it usable for comunity  (wiki page...)
It's tested on our system so we need to test  on clean core idempiere installation.


Marco Longo

Leszek Bober

unread,
Nov 17, 2020, 1:49:43 PM11/17/20
to iDempiere
It's very good news.
I can sponsor test time (on 12 diffirent instanses iD 5.1 and 7.1), and manual page.

I will contact you about this

Regards
Leszek Bober

Carlos Antonio Ruiz Gómez

unread,
Feb 4, 2021, 7:42:13 AM2/4/21
to iDempiere
Hi, any news on this?  Any way we can help?

Regards,

Carlos Ruiz

Marco Longo

unread,
Feb 5, 2021, 2:14:58 AM2/5/21
to iDempiere
Hi Carlos,
Leszek is using (Poland) in your system.
I will release documentation and code  ASAP.
 Not tested for all countries..this will next test

Marco Longo

Carlos Antonio Ruiz Gomez

unread,
Feb 5, 2021, 6:04:23 AM2/5/21
to idem...@googlegroups.com
Hi Marco,

We're not in need of this functionality at this moment, but it sounds something really useful to have for everybody in the EU, so if the code is made available we can help with code peer review, tests, etc.

Just advising as Eric Raymond suggests: Release Early, Release Often   ;)

Regards,

Carlos Ruiz



El 5/2/21 a las 08:14, Marco Longo escribió:

Diego Ruiz

unread,
Dec 22, 2023, 11:33:01 AM12/22/23
to iDempiere
Hi everyone,

We are happy to announce the release of a plug-in that validates the VAT number using the VIES API.

You can access the documentation on the wiki page and find the source code here.

We highly appreciate any feedback, testing, or suggestions for improvement.


Best regards,
Diego Ruiz
BX Service GmbH

Nicolas Micoud

unread,
Dec 22, 2023, 12:24:51 PM12/22/23
to iDempiere
Hi Diego,
Haven't tested, just read the wiki page.
Wouldn't be more user friendly to replace the execution of a process by a callout.
When the TaxID field loses focus, and if the field has changed and is not empty, call the validation?
So you directly know if the TaxID is correct or no?

Regards,

Nicolas

Diego Ruiz

unread,
Dec 22, 2023, 12:48:16 PM12/22/23
to iDempiere
Hi Nicolas,

The process lets the user validate the existing business partners that already have a tax ID, which was mainly our use case.

We thought about adding this validation in a callout, as you mentioned, triggering it when the first two characters of the tax ID are a part of the EU countries' code list but decided not to do it initially for simplicity and also because after testing with some countries, we noticed that sometimes VIES returns an error even if the address is valid such as times outs or:

MS_MAX_CONCURRENT_REQ: Your Request for VAT validation has not been processed; the maximum number of concurrent requests for this Member State has been reached. Your request cannot be processed due to high traffic towards the Member State you are trying to reach. Please try again later.

Those cases where the VIES API is "too busy" and returns an error are hard to manage with a callout because you either throw an error on the creation of the BP and the user has to "retry" entering the tax ID again or you have to run the process later on. So, we need to check how to control those cases to not interrupt the create/update workflow.

Your idea can be a good improvement for a second version - we were focused on releasing early solving the most common use case and improving from there with the feedback from the community.

Best regards,
Diego

Nicolas Micoud

unread,
Dec 23, 2023, 3:42:52 AM12/23/23
to iDempiere
Hi Diego,

That's a very good reason indeed :)

So maybe another way to execute manually is when user press the Enter key while on the TaxID field (you save 2 clicks).
That can be part of v1.5 :)

Nicolas

Carlos Antonio Ruiz Gomez

unread,
Dec 23, 2023, 7:11:02 AM12/23/23
to idem...@googlegroups.com
Hi, in case somebody wants to contribute the suggestion from Nicolas, this is my understanding:

- the call to VIES can take time, sometimes the site is too busy and it takes several seconds to answer that is not available
so, if added as callout I think it must have also a SysConfig to enable/disable the callout
it's possible that the user experience is worst if after typing the TaxID the UI freeze for several seconds

- on the other hand - the callout could raise a Warning, but I think it must not forbid to save the record
according to what I read in VIES documentation, the VAT validation doesn't mean the VAT does not exist, but it means that is not valid for intra-EU VAT exemption

so, is still possible to transact with VAT that are not valid from VIES, but you need to charge the VAT in this case.  In practice that sounds complex, you need to charge the VAT of the receiving country, and pay it there, so I guess most people would avoid that.  But because of this, forbidding to save or forbidding the transaction must be a decision of each company, not the plugin.

Regards,

Carlos Ruiz



Am 23.12.23 um 09:42 schrieb Nicolas Micoud:

Leszek Bober

unread,
Mar 14, 2024, 5:24:14 AM3/14/24
to iDempiere
Hi,
I'll throw in my two cents.
In Poland, the law requires "proof" that one has attempted to verify VAT. Therefore, as shown in the attached screenshot, we have resolved this by recording the VIES server response, which it returns to us during manual VAT checks. If an error occurs, we log it along with the date and time. The process is such that the user verifies this through actions 1 and 2 (as shown in the screenshot), and the result is recorded in the appropriate table 3.

Under Polish law, if an attempt to check the VAT fails repeatedly due to an error that is identified as occurring on the side of the VAT verification service provider, it exempts from liability (significantly limits liability).vies.png

Carlos Antonio Ruiz Gomez

unread,
Mar 14, 2024, 11:19:40 AM3/14/24
to idem...@googlegroups.com
Thanks Leszek,

Diego's code is running a process, so I think the proof of attempt resides in AD_PInstance, not sure if that's enough for Polish case.

Regards,

Carlos Ruiz



Am 14.03.24 um 10:24 schrieb Leszek Bober:
Hi,
I'll throw in my two cents.
In Poland, the law requires "proof" that one has attempted to verify VAT. Therefore, as shown in the attached screenshot, we have resolved this by recording the VIES server response, which it returns to us during manual VAT checks. If an error occurs, we log it along with the date and time. The process is such that the user verifies this through actions 1 and 2 (as shown in the screenshot), and the result is recorded in the appropriate table 3.

Under Polish law, if an attempt to check the VAT fails repeatedly due to an error that is identified as occurring on the side of the VAT verification service provider, it exempts from liability (significantly limits liability).

Leszek Bober

unread,
Mar 14, 2024, 12:50:05 PM3/14/24
to iDempiere
Hi Carlos,
It would be safer to log in visible to the user VIES server response. In Poland there is a rule that EU Directive in EU = EU Directive x 100 In Poland :)

Reply all
Reply to author
Forward
0 new messages