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
306 stars 48 forks source link

Tax exemptions in some regions of Spain #1

Closed jvmonjo closed 6 years ago

jvmonjo commented 6 years ago

When Spain is selected as tax origin country, some regions should not have tax applied.

These are the regions with tax rate 0:

SalesTax.getSalesTax('ES', 'CE') // Ceuta SalesTax.getSalesTax('ES', 'ML') // Melilla SalesTax.getSalesTax('ES', 'TF') // Tenerife SalesTax.getSalesTax('ES', 'GC') // Las Palmas

valeriansaliou commented 6 years ago

Hi! Thanks for that. Could you PR this? You can add Spanish regions in the data file (look at examples from the US and Canada states, the structure should be similar for Spain).

Eg. for Canada: https://github.com/valeriansaliou/node-sales-tax/blob/master/res/sales_tax_rates.json#L77

jvmonjo commented 6 years ago

Done. I've sent a PR with the Spanish regions and tax rates: https://github.com/valeriansaliou/node-sales-tax/pull/2

valeriansaliou commented 6 years ago

Published in v2.0.5.