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

Implement GST for India #31

Closed aggarwaldev closed 4 years ago

aggarwaldev commented 4 years ago

Great library! Thank you for simplifying tax rates.

I must point out that GST was implemented in India in 2017 replacing VAT, excise duty and service tax while node-sales-tax still returns VAT for India.

File: https://github.com/valeriansaliou/node-sales-tax/blob/master/res/sales_tax_rates.json#L266-L268 More Info: https://cleartax.in/s/differences-between-gst-and-vat

I must point out that India has multiple tax rate for GST: 0%, 5%, 12%, 18%, 28%, 28% (+ Cess) depending upon the item. Sample: https://cleartax.in/s/gst-rates

It's pretty clear that changing tax from VAT to GST won't do the trick and therefore, an additional method is required which may accept Item name (or Tax rate) and maintain uniform logic.

valeriansaliou commented 4 years ago

Thanks for filing this issue w/ all details.

Unfortunately, I do not plan to provide support for different tax rates anytime soon, but I can definitely update VAT to GST and configure the "typical" tax rate as the rate that the library would return (ie. the most common tax rate for most products, as all countries typically have such a common tax rate).

Could you let me know which rate I should pick?

aggarwaldev commented 4 years ago

In that case 18% would do the trick.

Unfortunately, I do not plan to provide support for different tax rates anytime soon

Can you add a method that would let user override tax?

Something like: .overrideTax(Number)?

valeriansaliou commented 4 years ago

Released v2.2.4.