stdnum.si.ddv¶
ID za DDV (Davčna številka, Slovenian VAT number).
The DDV number (Davčna številka) is used for VAT (DDV, Davek na dodano vrednost) purposes and consist of 8 digits of which the last is a check digit.
>>> validate('SI 5022 3054')
'50223054'
>>> validate('SI 50223055')  # invalid check digits
Traceback (most recent call last):
    ...
InvalidChecksum: ...
- 
stdnum.si.ddv.calc_check_digit(number)¶
- Calculate the check digit. The number passed should not have the check digit included. 
- 
stdnum.si.ddv.compact(number)¶
- Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace. 
- 
stdnum.si.ddv.is_valid(number)¶
- Check if the number is a valid VAT number. 
- 
stdnum.si.ddv.validate(number)¶
- Check if the number is a valid VAT number. This checks the length, formatting and check digit.