borni-dhifi / vatnumber

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

GB checksum 9755 fails to validate #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
>>>vatnumber.check_vies('GB100190874')
True

>>> vatnumber.check_vat('GB100190874')
False

>>> vatnumber.check_vat_gb('100190874')
False

What is the expected output? What do you see instead?
Since the VIES validates this VAT number, the "local" check should also pass it 
as True.

What version of the product are you using? On what operating system?
Version 0.9 on Windows.

Original issue reported on code.google.com by olle.dah...@gmail.com on 6 Sep 2011 at 9:10

GoogleCodeExporter commented 8 years ago
Looking at the pseudo-spec linked from wikipedia[1], it appears that the series 
for the 9755 checksum really starts at 100XXXXXX not at 101XXXXXX.
Here is a patch that fixes the check and adds the relevant test sample.

[1] http://www.hmrc.gov.uk/ebu/developer-mins100309.htm - powerpoint slide 41

Original comment by o...@openerp.com on 21 Sep 2011 at 11:33

Attachments:

GoogleCodeExporter commented 8 years ago
I have some comments on the patch.
Could you submit a codereview using [1]
And later could you follow this [2] for commit message.

[1] https://codereview.appspot.com/
[2] https://code.google.com/p/tryton/wiki/HowtoContribute

Original comment by cedric.krier@b2ck.com on 21 Sep 2011 at 11:56

GoogleCodeExporter commented 8 years ago
Here you go: http://codereview.appspot.com/5085044/

Original comment by o...@openerp.com on 21 Sep 2011 at 1:17

GoogleCodeExporter commented 8 years ago
Updated patch following review comments

Original comment by o...@openerp.com on 21 Sep 2011 at 1:53

Attachments:

GoogleCodeExporter commented 8 years ago
Applied in r7ad44efeb16a

Original comment by cedric.krier@b2ck.com on 28 Sep 2011 at 10:33