bgandon / killbill-simple-tax-plugin

A Kill Bill plugin implementing tax codes with fixed rates and cut-off dates
11 stars 10 forks source link

Feature Request: Sales tax support #4

Open zebradots opened 8 years ago

zebradots commented 8 years ago

Thanks for a great plugin. It would be applicable to a large number of users who collect sales tax with a slight modification to specify the locality type as "state" or "country". If this field matches the given code, the applicable VAT or sales tax is applied, e.g.:

org.killbill.billing.plugin.simpletax.taxCodes.TAX_NY_std_2014_8%.locality = state
org.killbill.billing.plugin.simpletax.taxCodes.TAX_NY_std_2014_8%.code = NY

Would this be a feasible addition?

bgandon commented 7 years ago

Hello, I realized this limitation indeed just before freezing the development effort back in Feb 2016. A refactoring is still underway the adjust the “taxCountry” concept into a more flexible “taxZone” concept, that can designate any geographic area. This would cover your use case.

bgandon commented 7 years ago

As an update, I finalized and pushed the code for taxZonesupport a few weeks ago, in the refactor-taxCountry-into-taxZone branch.

The new taxZone form is <2-Letter-Country-Code>_<any string without any spaces>.

So, in your case this would become:

org.killbill.billing.plugin.simpletax.taxCodes.TAX_NY_std_2014_8%.taxZone = US_NY

This is a change that requires data migration, though. Indeed, all taxCountry custom fields need to be renamed to taxZone.

What I suggest as upcoming work is:

  1. Update this plugin to recent 0.18.x versions of Kill Bill
  2. Release an official v1.x with the now-deprecated taxCountry feature, for any people that are currently using this version in production.
  3. Release a v2.0 version with the new taxZone feature

How does this sound to you? And by the way, are you using this simple-tax-plugin in production?

zebradots commented 7 years ago

This would be perfect. We are currently using Pierre's fork for 0.18.x with 0.18.6 in testing. It appears to work without issue (apart from the confusion and limitation of setting a single taxCountry instead of taxZones).

This is not in production yet, so there is no data to migrate. We're more than happy to test compatibility with 0.18.6 if you decide to merge Pierre's changes into the refactor-taxCountry-into-taxZone branch.