Giter VIP home page Giter VIP logo

Comments (4)

krzaczek avatar krzaczek commented on July 19, 2024

@sophiekuehn i'll look at it in the evening

from vies.

jbrinksmeier avatar jbrinksmeier commented on July 19, 2024

hi @krzaczek co-worker of sophie here. I had a quick look already and stumbled across ValidatorFI rules

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

I read it like R=11 AND C8=0 is a valid VAT for Finland, but the code does not reflect this but only the last case ELSE C8 = R
At least that's how I read
return 11 - ($checkval % 11) == (int) $vatNumber[7];
If yo agree I can prepare a PR for this.
Thanks for your efforts :)

PS: forgot to mention that the VAT in question does fulfill the If R = 11 then C8 = 0 case

from vies.

krzaczek avatar krzaczek commented on July 19, 2024

from vies.

DragonBe avatar DragonBe commented on July 19, 2024

Fixed in #96 and tagged as release 2.1.11. Closing this issue now.

from vies.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.