stdnum.ro.cf

CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number).

The Romanian CF is used for VAT purposes and can be from 2 to 10 digits long.

>>> compact('RO 185 472 90')
'18547290'
>>> is_valid('185 472 90')
True
>>> is_valid('185 472 91')  # invalid check digit
False
>>> is_valid('1630615123457')  # personal code
True
stdnum.ro.cf.calc_check_digit(number)

Calculate the check digit for organisations. The number passed should not have the check digit included.

stdnum.ro.cf.compact(number)

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

stdnum.ro.cf.is_valid(number)

Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.

Previous topic

stdnum.pt.nif

Next topic

stdnum.ro.cnp