stdnum.mk.edb¶
ЕДБ (Едниствен Даночен Број, North Macedonia tax number).
This number consists of 13 digits, sometimes with an additional “MK” prefix.
More information:
>>> validate('4030000375897')
'4030000375897'
>>> validate('МК 4020990116747') # Cyrillic letters
'4020990116747'
>>> validate('MK4057009501106') # ASCII letters
'4057009501106'
>>> validate('4030000375890')
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> format('МК 4020990116747') # Cyrillic letters
'4020990116747'
>>> format('MK4057009501106') # ASCII letters
'4057009501106'
- stdnum.mk.edb.calc_check_digit(number)¶
Calculate the check digit.
- stdnum.mk.edb.compact(number)¶
Convert the number to the minimal representation.
This strips the number of any valid separators and removes surrounding whitespace.
- stdnum.mk.edb.format(number)¶
Reformat the number to the standard presentation format.
- stdnum.mk.edb.is_valid(number)¶
Check if the number is a valid North Macedonia ЕДБ number.
- stdnum.mk.edb.validate(number)¶
Check if the number is a valid North Macedonia ЕДБ number.
This checks the length, formatting and check digit.