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

Improve local tax feature #3391

Closed
alanna opened this issue Aug 5, 2020 · 10 comments
Closed

Improve local tax feature #3391

alanna opened this issue Aug 5, 2020 · 10 comments
Assignees
Labels
api Issues that require some work on the API (https://github.com/opencollective/opencollective-api) complexity → medium feature frontend

Comments

@alanna
Copy link
Contributor

alanna commented Aug 5, 2020

Currently we have an MVP feature for VAT that was never fully finished: https://docs.opencollective.com/help/fiscal-hosts/local-tax

Updating the host settings is part of the host dashboard project, and @Memo-Es and I think this is a good chance to improve the feature itself.

We need to make it so that local tax can be a) turned on and managed by host admins themselves, and b) used outside of just Europe. For example, I need to charge tax in certain situations for the new NZ host, but it's GST not VAT.

I propose:

  • A setting to turn local tax on and off for the host globally.
  • A setting for the host admin to define the tax name. In EU it's VAT, but in other places it's GST or sales tax. This is important for receipts being valid in their region. The name of this tax should appear on that column in the downloadable receipt and everywhere else tax appears.
  • A setting for the host's tax ID number, which is displayed on all receipts.
  • A setting to define the tax rate: I believe a simple % is good enough.
  • Turning on the local tax setting then activates a tier type Collective admins can select when offering something that attracts tax (e.g. product or service).
    • With the current VAT feature, it applies to product and service tiers, as well as event tickets. That's pretty good, but I think it might be better to generalise it because we don't know exactly what types of things need to be taxed in different places.
    • It could just switch on a tier called taxable and ticket-taxable or something like that, so regardless of what exactly they are selling they can set up a taxable tier.
  • Taxable tiers should have a setting that lets you select always apply tax or apply tax only if payer is in [host country].
  • If a financial contributor selects a taxable tier, we need to know what country they are in to enable the above. I believe this has already been built for the existing VAT feature but I'm not sure how it works.

@Betree I think you created the VAT feature... can you comment on how hard it would be to adapt that to the broader feature I've explained here? I will need this soon for OCNZ so I hope we can do it.

@alanna alanna added the feature label Aug 5, 2020
@Betree
Copy link
Member

Betree commented Aug 6, 2020

The feature initially implemented for VAT was pretty much what you describe here, something that was generic and configurable to fit any tax system. We rolled that back and ended up implementing very specific code for VAT because there were just too many specificities to integrate.

For example in the EU, you should charge VAT if:

  • It's tier is a TICKET, SERVICE, SUPPORT or PRODUCT
  • If the person who make the contribution:
    • Is in the EU
    • Is not a business, or if it's in the same country than the collective

There are other rules, for example the rate can vary depending on the tier type, but this is just a glimpse to demonstrate how the complexity of a customizable system can quickly escalate.

On top of that, there's the risk of people not updating their configurations. VAT rates recently changed in Germany and because we rely on standard VAT libraries rather than a custom field, we're sure that our systems were updated in time to apply the new rate. With a custom system, if host admins don't remember to do this in time, they'll contact support and we'll have to manually fix the past transactions.

All that to say, I think that implementing a generic tax system is pretty complex and error prone and we shouldn't invest in that before we get a good understanding of the most common tax practices and feel confident enough to build something generic.

We have our own opencollective-taxes library, where we can safely implement the logic for new tax types. Integrating New Zealand's tax system would be simpler this way, and all hosts will have to do is to pick their country and input their tax id in the settings.

We'll also need to update the contribution flow, the API and some emails where VATlabel is hardcoded.

@alanna
Copy link
Contributor Author

alanna commented Aug 6, 2020

Thanks @Betree I had a feeling it was messy!

For the NZ case

Can you please create a library the OCNZ host can use?
Here are the requirements:

  • Tax name is GST
  • Tax rate is 15% always
  • It's the same for products and services so I just need one tax tier type option for regular tiers
  • Always apply GST to event tiers
  • I think we can leave out any country-specific settings so it can be simpler. 99% of the time buyers will be in NZ, and if not I don't think they will argue about tax.
  • I need to supply slightly different receipts depending on if it's a tax transaction or no-tax transaction (tax receipts have to say TAX RECEIPT at the top, while no-tax receipts just say PAYMENT RECEIPT, and I need to put the GST number on tax ones and say "no GST charged" on no-tax ones. I can achieve all this with the current options for receipts, I just need two sets of those options.

I am planning to launch OCNZ very soon, and if these GST settings are not ready I will just not allow any transactions that attract tax (unconditional donations are not taxed, only if they sell a product or service or ticket) until we can turn the GST settings on. But if it could be done soon and it's not too much work for you, I would be very happy.

For the general case

I have a feeling we might be able to create a much simpler general tax feature, and push the really complex stuff out to hosts as their responsibility. Like if we just give them the tools to create taxable tiers where they can set the rate themselves, they could create tiers like "T-shirt Germany" and "T-shirt France" and ask the buyers to select the correct one. Obviously this is a hacky solution and it's error prone, but if a host is willing to take this on (we should make a setting for host admins to turn on the feature for their Collectives or not), then we can give them the very basic tool and let them handle the rest.

@Betree Betree added api Issues that require some work on the API (https://github.com/opencollective/opencollective-api) complexity → medium frontend labels Aug 11, 2020
@Betree
Copy link
Member

Betree commented Aug 11, 2020

Thanks for all the details, there's everything in there to implement the tax system update.

It will require touching multiple services (opencollective-taxes, opencollective-pdf, frontend and API). I think I'm the most suited to do that since I've implemented the current tax system, but it's not a small work so we should define a proper priority for me to know how much attention I should give it compared to the current priorities.

@alanna
Copy link
Contributor Author

alanna commented Aug 12, 2020

For the time being, I just won't allow any tiers for taxable things under OCNZ, including any products, services, or event tickets. We could wait until we have a Collective actually wanting to sell something with GST (unconditional donations don't attract tax for OCNZ). But once that case comes along we might feel rushed.

@Betree - Maybe you could keep this task in the background and if you have any spare time you could chip away at it?

Ideally OCNZ would fund a bounty for this, but we have no money yet! Haha...

@alanna
Copy link
Contributor Author

alanna commented Sep 10, 2020

@Betree - things are picking up for OCNZ and there's a Collective that wants to start selling event tickets next week. Is there any way we can get this GST thing for NZ done soon?

@piamancini - OCNZ should pay for this but we don't have any money yet. We can add it as an expense and pay OC for it once we have that much in our balance.

@Betree
Copy link
Member

Betree commented Sep 11, 2020

@alanna I don't have the bandwidth to do it right now (already have tax forms for organizations + release of the contribution revamp to handle). This tax system update is a big task, that can't really be treated in the background. We need to dedicate a day of work for it.

So if we want that done we need to give it a proper prioritization. I'm happy to work on this feature, but I'm not the best person to decide on how we should prioritize it. I'll maybe let you and @piamancini discuss about that, and will update my priorities according to what you decide.

@Betree Betree self-assigned this Sep 15, 2020
@Betree
Copy link
Member

Betree commented Sep 18, 2020

@alanna Can you confirm that if an organization enters its tax id number (I think it's called NZBN?) then we shouldn't apply any tax?

@alanna
Copy link
Contributor Author

alanna commented Sep 21, 2020

Sorry @Betree I just saw this. We don't need to do anything with NZBN's and that has no affect on GST. I will put OCNZ's GST number in the box for extra info on the receipts, and we don't need to collect their GST number.

@Betree
Copy link
Member

Betree commented Oct 8, 2020

GST for New Zealand is now implemented & deployed.

While working on this feature, I documented #3570 that could help us to easily build support for other tax types in the future.

@Betree
Copy link
Member

Betree commented Nov 17, 2020

Though it's not a fully generic system, the code now supports multiple taxes and it will be easier to add new ones so I think this is done. Feel free to re-open if you think we still have work to do here.

@Betree Betree closed this as completed Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues that require some work on the API (https://github.com/opencollective/opencollective-api) complexity → medium feature frontend
Projects
Status: Done
Development

No branches or pull requests

2 participants