borni-dhifi / vatnumber

Automatically exported from code.google.com/p/vatnumber
GNU General Public License v3.0
0 stars 0 forks source link

Sweden vat validation fail #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
>>> import vatnumber
>>> vatnumber.check_vat('SE556728341001')
False

This is a valid IT VAT number according to:
http://ec.europa.eu/taxation_customs/vies/viesquer.do

What is the expected output? What do you see instead?
It should be True

What version of the product are you using? On what operating system?
0.9

Please provide any additional information below.
according to this link:
http://sima-pc.com/nif.php?pais=IT&nif=SE556728341001
 N(1-9)+C(1)+N(10-11)
 N(10-11)>0
 e.g: 123456789701 
that means 
       N(1-9) = 123456789
       C(1) = 7
       N(10-11) = 01 

Line no : 1017 is
    if int(vat[9:11]) <= 0:
        return False
it should be 
    if int(vat[9:11]) < 0:
        return False

as the check can be 0, in my example int(vat[9:11]) = 0

Thanks,
Purnendu Singh(openERP)

Original issue reported on code.google.com by micku1...@gmail.com on 4 Jul 2011 at 1:25

GoogleCodeExporter commented 8 years ago
Hello,

Any updates on this issue!!

Thanks in advance,
Purnendu Singh(OpenERP)

Original comment by micku1...@gmail.com on 11 Jul 2011 at 6:38

GoogleCodeExporter commented 8 years ago
Fixed with rev f8e25cd17789

PS: next time if you want to have fix faster submit a correct patch (as 
attachment).

Original comment by cedric.krier@b2ck.com on 15 Jul 2011 at 10:53

GoogleCodeExporter commented 8 years ago
rf8e25cd17789

Original comment by cedric.krier@b2ck.com on 15 Jul 2011 at 10:54

GoogleCodeExporter commented 8 years ago
Thanks for the fixes.

Purnendu Singh(OpenERP) 

Original comment by micku1...@gmail.com on 18 Jul 2011 at 6:18