arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
489 stars 204 forks source link

San Marino Tax number should not be stripped from 0s #339

Closed jco-odoo closed 1 year ago

jco-odoo commented 1 year ago

https://github.com/arthurdejong/python-stdnum/blob/master/stdnum/sm/coe.py#L57 should not have the lstrip("0")

From http://admin.abc.sm/cms/media/www.anis.sm/29-501-317%20Procedura%20interscambio%20RSM-ITA.pdf Sulle fatture deve essere indicato il numero di identificazione dell'operatore economico sammarinese (composto dal prefìsso SM seguito da cinque cifre XXXXX) (prefix SM followed by 5 numbers XXXXX)

So, if you have a number 01234 it should not be compacted to 1234

jco-odoo commented 1 year ago

Apparently, in most use cases, it seems that the trimming is ok, so I will close this. It might only be important for the e-invoicing.