Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to use custom sales tax rates #41

Open
markusrempfer opened this issue May 11, 2021 · 0 comments
Open

Function to use custom sales tax rates #41

markusrempfer opened this issue May 11, 2021 · 0 comments

Comments

@markusrempfer
Copy link

markusrempfer commented May 11, 2021

Can you add a function that replaces and overrides the 'sales_tax_rates.json' ?

So instead of using the ...

var tax_rates = require("../res/sales_tax_rates.json");

... in your 'sales_tax.js', someone can define and use a function at the beginning that replaces the 'sales_tax_rates.json' and use a custom file?! E.g:

SalesTax.setSalesTaxRates("./helpers/sales_tax_rates_custom.json")

And as a plus, just/only overrides/adds indiviual objects of the 'sales_tax_rates.json' if country/state exist/does not exist?! So e.g. :

SalesTax.setSalesTaxRates("./helpers/sales_tax_rates_custom.json", "override")

I've notice that the Value-added tax (VAT) rates from PwC are in some cases a bit different ... e.g.

China (CN):
You: 16
PWC: 13, 9, or 6

Kenya (KE):
You: 14
PWC: 16

Nigeria (NG)
You: 5
PWC: 7.5

...

Or is this already possible?

It would be great to have this so we don't have to wait till you update it! And given the complexity adding their individual rates.

I also think that would help with other existing and probably incoming request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant