Closed jhk-odoo closed 4 years ago
@arthurdejong let me know what you think about this
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?
Another VAT number: NL002455799B11 FYI: https://www.belastingdienst.nl/wps/wcm/connect/bldcontenten/belastingdienst/business/vat/new-vat-id/
About the list: http://kleineondernemer.nl/index.php/nieuw-btw-identificatienummer-vanaf-1-januari-2020-voor-eenmanszaken
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
@timmuller The PR is not correct. I'll adapt what we have done in https://github.com/odoo/odoo/pull/42681
Thanks everyone for helping fix this. I've implemented the fix in a9b3e90. I will make a new release quickly.
New vat numbers received by companies after the 1st january 2020 are considered invalid.