Closed jvmonjo closed 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
Done. I've sent a PR with the Spanish regions and tax rates: https://github.com/valeriansaliou/node-sales-tax/pull/2
Published in v2.0.5
.
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