Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for vat numbers from FI, allow 0 as last digit #96

Merged

Conversation

jbrinksmeier
Copy link
Contributor

@jbrinksmeier jbrinksmeier commented Jan 14, 2020

This is a mitigation for #95
For FI VAT numbers, implementation of this algorithm

VAT format: [C1 C2 C3 C4 C5 C6 C7 C8]

Range:
C2 .. C8 Numeric from 0 to 9

Rules:
C8
R = 11 - (7C1 + 9C2 + 10C3 + 5C4 + 8C5 + 4C6 + 2*C7) modulo11
If R = 10 then, VAT number is invalid
If R = 11 then C8 = 0
Else C8 = R

lacks acceptance for

if R = 11 then C8 = 0

This PR adds that case as valid VAT

Copy link
Collaborator

@krzaczek krzaczek left a comment

Choose a reason for hiding this comment

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

Looks good ..

Copy link
Owner

@DragonBe DragonBe left a comment

Choose a reason for hiding this comment

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

Looks good to me, let me merge it in.

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.

None yet

3 participants