Fix UID validation
This commit is contained in:
@ -302,7 +302,7 @@ namespace Elwig.Helpers {
|
|||||||
|
|
||||||
// http://www.pruefziffernberechnung.de/U/USt-IdNr.shtml
|
// http://www.pruefziffernberechnung.de/U/USt-IdNr.shtml
|
||||||
int s = 0, v = 0;
|
int s = 0, v = 0;
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
s += ((text[i + 3] - '0') * (i % 2 + 1)).ToString().Select(ch => ch - '0').Sum();
|
s += ((text[i + 3] - '0') * (i % 2 + 1)).ToString().Select(ch => ch - '0').Sum();
|
||||||
v = (96 - s) % 10;
|
v = (96 - s) % 10;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user