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

Wrong tax calculation for Spain #4

Closed jvmonjo closed 6 years ago

jvmonjo commented 6 years ago

Since the tax is calculated with the sum of Country Tax + State Tax, the previous values were wrong.

Now it only includes states wich are exempt of tax (with negative rate) and any other state gets the default tax.

This way the calculation is correct and the code is easier to mantain.

Here is the PR. I hope you are ok with this. And sorry for the previous wrong PR: https://github.com/valeriansaliou/node-sales-tax/pull/3

jvmonjo commented 6 years ago

Since the PR has been merged, I'm closing this issue. Thank you very much.