Closed MortenAbildgaard closed 1 month ago
Hi Morten,
Thanks for the feedback! I have a good idea of where the issue might be. This line of code strips all letters from the VAT number: https://github.com/jofme/D365FinanceToolbox/blob/dev/Metadata/FinanceToolbox/FinanceToolbox/AxClass/FTBXECVIESCheckResult.xml#L39
vatNumTested = strKeep(vatNum, '0123456789');
It should be an easy fix. I'll look into it shortly.
@MortenAbildgaard I have rewritten how VAT numbers are corrected before sending them to VIES:
The ISO country/region code will be removed from the VAT number. All non-alphanumeric characters will be removed. My test included NLD and BEL VAT numbers.
The following parameters have also been added:
There are still some cases that should be handled. For example, some member states require more information to validate VAT numbers. That metadata is not available right now.
I'm a bit behind on the September release due to illness, but I hope to release it this week. If you have time, could you test it for me with your VAT numbers? I can create a model for you if needed.
Hey Jonas Thanks a bunch for sharing this development. Much appreciated. I am actually with an enduser organization today and hence not a developer. However, if you can produce a model, I will try to have our partner implement it in our sandbox environment. I assume your boolean 'Skip VAT number correction' simply uses the Tax registration number without any removal of characters when validating with VIES? Lastly, I am transitioning to another company, so I will try to hand this over to a colleague.
Yes, that is correct. The 'Skip VAT number correction' will send the number without removal of characters. I do however recommend never setting it.
The latest build of DEV can be found here: https://github.com/jofme/D365FinanceToolbox/actions/runs/10984309985
Alternatively, if you have installed FinanceToolbox and not FinanceToolboxExtended, I have attached separate packages to this comment FinanceToolbox_20240923_14_11_32.zip FinanceToolboxExtended_20240923_14_12_19.zip
Hi @MortenAbildgaard, I'm closing this issue as resolved is it can become part of the delayed September release. Hope it's okay. Please let me know if you still have issues.
Also, if you want to have something added to the finance toolbox (additions to the VIES validation, for example), do let me know (-:
We have tested the VIES functionality and our findings are that the functionality strips all letters from the Tax exempt number when generating the VAT VIES number for querying
This poses a problem for example for NLD. A valid VIES VAT number for Netherlands contain the letter B for the 10th figure of 12 figures. 123456789B12. When the B is stripped, we end up with 11 figures and the Tax exempt number becomes invalid when validating.