-
Notifications
You must be signed in to change notification settings - Fork 13
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
Supply a default tax rate #182
Conversation
e533816
to
4528c0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you going to get a bunch of failures because you made the new tax amount 0 and the old one was 0.5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is great, but I'm curious how you decided on the name "TaxJar Placeholder Rate".
I think this name, too, like the previous name, could be confusing. Someone might decide, "Oh, a placeholder? I should delete this."
Maybe a more explicit name, like "Solidus TaxJar Connection Rate", could be advantageous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Noah-Silvera and @adammathys! I am in favour of this change in general, I am just not sure if we need to change the name of the tax rate.
Chris's comment leads me to think that the tax rate (or tax rate name?) needs to be configurable. |
I like this name!
The motivation for changing the name is that currently users will end up with a rate in their system with a default amount of 0.05 and no indication that it is connected to our extension other than a little piece of documentation in the readme. This feels like a pretty brittle dependency. If a user does not understand why that tax rate is there, and changes the name or deletes it, our extension will fail. This change a.) Ensures a Tax Rate is always available and b.) changes the name of the Tax Rate to relate it to the extension and gives it a default amount of Having two active tax rates doesn't seem like a huge problem to me! Esp. since the sales tax rate doesn't apply to the app at all since this extension completely takes over tax calculation. We could add a step in the
I'm not sure this would make sense, if the purpose of this change is to stop people from messing with the tax rate by giving it a clearer name to describe it's purpose!
|
I am not sure that is the case outside of specs. We currently rely on users setting up the tax rate themselves, so the amount on the rate would be whatever the user creates, right? I think I am onboard with the change proposed here. I do think we should use a slightly better name, something that non-technical users can recognize and possibly also leave the note in the documentation that the rate must exists, or it will be created by the extension. I like @benjaminwil's proposed name but would drop the "Connection" part of it as that doesn't really add any clarity. Something like "Solidus TaxJar Rate" or just "TaxJar Rate" makes the most sense to me. |
We discussed this on slack, but good to make a note of it here for visibility This extension completely replaces the calculator that calculates tax based on TL;DR - Welcome to TaxJar, the extension where tax rates are made up and the amounts don't matter! |
I added a wiki page better describing how this extension hooks into tax calculation in solidus! https://github.com/SuperGoodSoft/solidus_taxjar/wiki/How-Solidus-TaxJar-calculates-tax |
4528c0f
to
83dcfc9
Compare
Updated the name of the default tax rate to |
Added a link to the wiki page in the readme and updated the changelog |
09a5525
to
c7365bf
Compare
Just a rebase on master! |
c7365bf
to
30a3560
Compare
Looks like tests are failing due to this octokit/octokit.rb#1420 |
All tax adjustments need a TaxRate as a source. Previously, we were relying on a user to have a tax rate with the name "Sales Tax" configured. This was an easy to miss configuration step. We should instead create the placeholder `Spree::TaxRate` desired with a descriptive name. Co-authored-by: Adam Mueller <adam@super.gd>
We want to inform users that the custom TaxCalculator of this project will create a `Spree::TaxRate` and that other tax rates will be ignored, so we add a short blurb and link users to the more detailed wiki page.
30a3560
to
1fde2ed
Compare
Just pushed to fix a changelog conflict. |
What is the goal of this PR?
All tax adjustments need a TaxRate as a source. Previously, we were relying on a user to have a tax rate with the name "Sales Tax" configured. This was an easy to miss configuration step. We should instead create the placeholder
Spree::TaxRate
desired with a descriptive name.How do you manually test these changes? (if applicable)
Merge Checklist