maielo / stripe-tax-utils

stripe-vat utility tools
MIT License
5 stars 5 forks source link

Venezuelan taxcode Regex (BUG) #7

Closed mmmarcolino closed 6 months ago

mmmarcolino commented 6 months ago

https://github.com/maielo/stripe-tax-utils/blob/7aa2eb32090a1215cb0b71e264a1a21f9e71a6cc/src/stripeTaxMap.ts#L647

The Venezuelan tax-code regex accepts only tax-code starting with 'A' while it should accept every capital letter '[A-Z]'.

Perhaps this tax-code 'J-12354768-9' should be accepted as a valid Venezuelan tax-code (as far as I know) but it doesn't.

Thanks for your help in advance.

mmmarcolino commented 6 months ago

Cfr. https://www.zim.com/za-cn/news/shipping-news-regulations/venezuelan-rif-number

maielo commented 6 months ago

From this link: "The number consists of an E, I, J, or V, followed by an eight-digit number and a check digit, all separated by hyphens. For example: V-12345678-0." So only letters E,I,J or V are allowed. Current regex assumes only A which is wrong. Going to fix it

mmmarcolino commented 6 months ago

Thanks, for your work and for fixing this, thanks a lot! I appreciate it! :)

maielo commented 6 months ago

Fixed and published