Skip to content

[FIX] nl: dutch vat check broken since 01/01/2020#183

Closed
jhk-odoo wants to merge 1 commit into
arthurdejong:masterfrom
jhk-odoo:master
Closed

[FIX] nl: dutch vat check broken since 01/01/2020#183
jhk-odoo wants to merge 1 commit into
arthurdejong:masterfrom
jhk-odoo:master

Conversation

@jhk-odoo
Copy link
Copy Markdown

@jhk-odoo jhk-odoo commented Jan 7, 2020

New vat numbers received by companies after the 1st january 2020
are considered invalid.

New vat numbers received by companies after the 1st january 2020
are considered invalid.
@jhk-odoo
Copy link
Copy Markdown
Author

jhk-odoo commented Jan 7, 2020

@arthurdejong let me know what you think about this

@arthurdejong
Copy link
Copy Markdown
Owner

arthurdejong commented Jan 7, 2020

Can you provide of this change to the check algorithm? Where do the letters come from?

Also, the tests fail due to an undefined check_val_sole and these changes to BSN will not fix BTW because the format is checked which disallows non-numeric digits before the checksum algorithm is applied.

Can you provide some sample numbers of actual companies that are valid (i.e. pass the VIES VAT validation but do not pass the check algorithm in BSN?

Copy link
Copy Markdown

@CasVissers-360ERP CasVissers-360ERP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the issue for me, tested with vatnumber: NL000099998B57

vatnumber from: https://www.dezaak.nl/467/zo-ziet-btw-nummer-eruit.htm

@nim-odoo
Copy link
Copy Markdown

nim-odoo commented Jan 9, 2020

@timmuller
Copy link
Copy Markdown

timmuller commented Jan 9, 2020

Fixes the issue for me, tested with vatnumber: NL000099998B57

vatnumber from: https://www.dezaak.nl/467/zo-ziet-btw-nummer-eruit.htm

@CasVissers How can this work, it contains a syntax error, causing all tests to fail?

Edit: With the assumption check_val_sole is check_val to cast of an int, the check won't work for our VAT-number NL822898044B01, which does not result in the magic number 98 to have rest 1

@nim-odoo
Copy link
Copy Markdown

nim-odoo commented Jan 9, 2020

@timmuller The PR is not correct. I'll adapt what we have done in odoo/odoo#42681

@arthurdejong
Copy link
Copy Markdown
Owner

Thanks everyone for helping fix this. I've implemented the fix in a9b3e90. I will make a new release quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants