valeriansaliou / node-sales-tax

:moneybag: International sales tax calculator for Node (offline, but provides optional online VAT number fraud check). Tax rates are kept up-to-date.
https://www.npmjs.com/package/sales-tax
MIT License
299 stars 45 forks source link

Fix Greece VAT number online check #64

Closed intarsz closed 7 months ago

intarsz commented 7 months ago

Greece uses 'EL', not 'GR' for VAT numbers. 'EL' must be passed to validate-vat for VAT number online check.

validate-vat supported countries list: https://github.com/viruschidai/validate-vat/blob/master/src/index.coffee#L24 and related commit: https://github.com/viruschidai/validate-vat/commit/b07a1b9dbae5590c39d284f7182cac6066e843db

valeriansaliou commented 7 months ago

Thank you, nice catch! Processing now.

valeriansaliou commented 7 months ago

Could you please provide me w/ a valid / real company's Greek VAT number? I cannot seem to find one online. I'd like to update the unit tests to handle this specific case.

intarsz commented 7 months ago

Could you please provide me w/ a valid / real company's Greek VAT number? I cannot seem to find one online. I'd like to update the unit tests to handle this specific case.

HELLENIC TELECOMMUNICATIONS ORGANIZATION SA - EL094019245

valeriansaliou commented 7 months ago

Added in 16bc6ad5931ec71a4513f958a4199f077f62c4f3 thanks!