Implement Betriebsnummer check
This commit is contained in:
@ -246,9 +246,16 @@ namespace Elwig.Helpers {
|
|||||||
return new(false, "Betriebsnummer zu kurz");
|
return new(false, "Betriebsnummer zu kurz");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// https://statistik.at/fileadmin/shared/QM/Standarddokumentationen/RW/std_r_land-forstw_register.pdf#page=41
|
||||||
|
int s = 0;
|
||||||
|
for (int i = 0; i < 6; i++)
|
||||||
|
s += (input.Text[i] - '0') * (7 - i);
|
||||||
|
s = (11 - (s % 11)) % 10;
|
||||||
|
|
||||||
return new(true, "Not implemented yet");
|
if (s != (input.Text[6] - '0'))
|
||||||
|
return new(false, "Prüfsumme der Betriebsnummer ist falsch");
|
||||||
|
|
||||||
|
return new(true, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ValidationResult CheckUstId(TextBox input, bool required) {
|
public static ValidationResult CheckUstId(TextBox input, bool required) {
|
||||||
|
Reference in New Issue
Block a user