Closed tomkcey closed 4 years ago
Thanks, I'd accept a PR for this.
I'm not authorized to post a PR.
remote: Permission to valeriansaliou/node-sales-tax.git denied to tomkcey.
fatal: unable to access 'https://github.com/valeriansaliou/node-sales-tax.git/': The requested URL returned error: 403
I'm on a branch I called fix/rate
.
Please fork the repo and PR from there.
Sorry about that, but a regression was introduced by PR #32 ; it's been fixed in v2.2.3
. I assume I can close this.
Hi, I would like to use this library in my application for sales tax in Canada, but after executing the following code to check the values currently offered, I stumbled upon something I think might be a bug.
Results in:
In all of those, that rate would actually be the
hst
-gst
, because thehst
includes thegst
already. Ontarians, for example, don't pay 18% taxes, they pay 13%.If you agree, I could produce a PR to fix this for you, but wanted first to open up a discussion just in case.
My solution would be to remove the
gst
from the details when there's anhst
and calculate therate
by sum of detailed rate. It's something I'm thinking about on the fly.