Export to GitHub

vatnumber - issue #17

GB checksum 9755 fails to validate


Posted on Sep 6, 2011 by Happy Lion

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.

Comment #1

Posted on Sep 21, 2011 by Happy Dog

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

Attachments

Comment #2

Posted on Sep 21, 2011 by Helpful Kangaroo

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

Comment #3

Posted on Sep 21, 2011 by Happy Dog

Here you go: http://codereview.appspot.com/5085044/

Comment #4

Posted on Sep 21, 2011 by Happy Dog

Updated patch following review comments

Attachments

Comment #5

Posted on Sep 28, 2011 by Helpful Kangaroo

Applied in r7ad44efeb16a

Status: Fixed

Labels:
Type-Defect Priority-Medium