Fix UID validation

This commit is contained in:
lorenz.stechauner committed 2023-04-28 00:40:09 +02:00
1 parent 4456b2228d
commit 35421bb585
1 file changed
+1 -1
+1 -1
View File
@@ -302,7 +302,7 @@ namespace Elwig.Helpers {
// http://www.pruefziffernberechnung.de/U/USt-IdNr.shtml
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();
v = (96 - s) % 10;