commerceguys / tax

A PHP 5.5+ tax library.
MIT License
276 stars 39 forks source link

Canadian zones? #30

Open JoeMurray opened 9 years ago

JoeMurray commented 9 years ago

Skimming the repo I see a bit of code for tax resolver for Canada, but not zones and tax rate resource files. Where is the definition of Canadian tax rates?

My understanding is that the rate to be applied for services is determined by the location where the services are rendered. So membership services might be taxed at purchaser's address (eg if the services were an electronic newsletter and online access) or the seller's address (eg if the seller was a YMCA offering members use of its pool and gym at a specific address). A common case where a third address would be needed is paying for a ticket to an event at a physical venue other than seller's or purchaser's address. So an Ottawa-based company selling a ticket to someone in Ottawa, Ontario would need to apply Quebec Sales Tax if the event venue was across the river in Hull, Quebec.

What is the data model for determining which address to use when determining zone, and where is the data for Canada? Thanks!

bojanz commented 9 years ago

There's no data for Canada yet, please send us a pull request.

The default logic applies tax rates based on the purchaser's address (selling to Quebec, apply Quebec tax). The other use cases (events, gyms) are examples of a fixed place of supply, and are handled best through a custom resolver (that gets the event address from the taxable object, for example)

JoeMurray commented 9 years ago

Thanks, @bojanz. How ready is this for use in EU - beta, RC, production?

We've got some code for CiviCRM that calculates Canadian tax rates, and I'm considering integrating this repo in as a more general solution to support Australia and EU. CiviCRM integrates with WordPress and Joomla as well as Drupal. Are there any Drupal dependencies in here at all (I didn't see any)?

And do you expect that CommerceGuys will be able to keep the tax rates up to date?

bojanz commented 8 years ago

The current EU code has been used in production for months now. We might change the APIs for performance reasons at some point, but the actual logic is sound, reviewed, and tested.

Keeping the tax rates up to date is a community effort. Luckily we have companies like FoxyCart in the community, and they've been keeping the EU rates up to date.

joelpittet commented 8 years ago

There's a pull request here to review https://github.com/commerceguys/tax/pull/31