Ë
    Ã?Æi\	  ã                  óN   — d Z ddlmZ ddl­ ddlmZmZ d
d„Zd
d„Zd
d„Z	dd„Z
y	)u”  TVA (taxe sur la valeur ajoutÃ©e, Luxembourgian VAT number).

The nÂ° TVA (NumÃ©ro d'identification Ã  la taxe sur la valeur ajoutÃ©e) is
used for tax purposes in Luxembourg. The number consists of 8 digits of
which the last two are check digits.

>>> validate('LU 150 274 42')
'15027442'
>>> validate('150 274 43')  # invalid check digits
Traceback (most recent call last):
    ...
InvalidChecksum: ...
é    )Úannotations)Ú*)ÚcleanÚisdigitsc                ó‚   — t        | d«      j                  «       j                  «       } | j                  d«      r| dd } | S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.z :.-ÚLUé   N)r   ÚupperÚstripÚ
startswith©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/lu/tva.pyÚcompactr   )   s@   € ô �6˜6Ó"×(Ñ(Ó*×0Ñ0Ó2€FØ×Ñ˜ÔØ˜˜�ˆØ€Mó    c                ó$   — dt        | «      dz  z  S )z*Calculate the check digits for the number.z%02déY   )Úintr   s    r   Úcalc_check_digitsr   2   s   € à”S˜“[ 2Ñ%Ñ&Ð&r   c                ó²   — t        | «      } t        | «      s
t        «       ‚t        | «      dk7  r
t	        «       ‚t        | dd «      | dd k7  r
t        «       ‚| S )zbCheck if the number is a valid VAT number. This checks the length,
    formatting and check digit.é   Né   éþÿÿÿ)r   r   ÚInvalidFormatÚlenÚInvalidLengthr   ÚInvalidChecksumr   s    r   Úvalidater   7   sX   € ô �V‹_€FÜ�FÔÜ‹oÐÜ
ˆ6ƒ{�aÒÜ‹oÐÜ˜  ˜Ó$¨¨r¨s¨Ò3ÜÓÐØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z*Check if the number is a valid VAT number.F)Úboolr   ÚValidationErrorr   s    r   Úis_validr"   D   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r   ÚstrÚreturnr#   )r   r#   r$   r    )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r   r"   © r   r   ú<module>r*      s)   ðñ*õ #ä ß 'óó'ó

ôr   