stdnum.si.maticna

Matična številka poslovnega registra (Corporate Registration Number)

The Corporate registration number represent a unique identification of each unit of the business register, assigned by the registry administrator at the time of entry in the business register, which shall not be changed.

The number consists of 7 or 10 digits and includes a check digit. The first 6 digits represent a unique number for each unit or company, followed by a check digit. The last 3 digits represent an additional business unit of the company, starting at 001. When a company consists of more than 1000 units, a letter is used instead of the first digit in the business unit. Unit 000 always represents the main registered address.

More information:

>>> validate('9331310000')
'9331310'
>>> validate('9331320000')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.si.maticna.calc_check_digit(number)

Calculate the check digit.

stdnum.si.maticna.compact(number)

Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.si.maticna.is_valid(number)

Check if provided is valid ID. This checks the length, formatting and check digit.

stdnum.si.maticna.validate(number)

Check if the number is a valid Corporate Registration number. This checks the length and check digit.