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

Taxation documentation #2403

Merged
merged 6 commits into from
Jan 3, 2018

Conversation

benjaminwil
Copy link
Contributor

I’ve rewritten and expanded the taxation guide. For this PR, I’ve made these changes:

  • I broke out the section into multiple articles with descriptive subheadings. Developers should be able to skim and scan each article more quickly now.
  • I more clearly show how zones, tax rates, and tax categories would be set up in a real store.
  • I fixed inaccurate information about VAT-style taxes and create more extensive context/examples.

There is more work to be done with taxation documentation, but I think this is an improvement over what we had before. In future PRs, I’d like to see the following changes:

  • We should provide an example of a store that needs to tax using multiple VAT and ship to a country that doesn’t use VAT like the U.S.
  • We should provide more context and resources for someone who wanted to use a service like Avalara or Tax Cloud to handle taxation.

This is part a larger project to improve Solidus's documentation. See this gist with the high-level table of contents. Where and how this documentation will exist is still up for discussion.

Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a big improvement over the last taxation guide. However, I find a few inaccuracies still.

calculator can be changed if you need to develop a more specialized tax
calculator for your application.

The `Spree::TaxRate` module includes the `Spree::Calculator` that calculates the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a Ruby level, this is quite incorrect. The Spree::TaxRate model is a class, not a module, and the Spree::Calculator is an entire group of classes that has to do with tax rates, but also with other things. A developer reading this sentence assuming the person who wrote knows Ruby well will likely be very confused.

What about this:

Every `Spree::TaxRate` you create will be connected to a `Spree::Calculator` 
instance that calculates the correct tax amount for a given shipment or line item. 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this (and your continued patience as I figure this stuff out). 👍

Solidus can then proceed to calculate the correct consumer prices for each
country with `included_in_price` VAT rates. It also generates a fallback
"export" price, where the price's `country_iso` is `nil`. New products will
behave as if that checkbox were selected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that checkbox I believe refers to Rebuild VAT prices, correct? Maybe spell it out, we're two sentences away from the last checkbox, and I think included_in_price can also be displayed as a checkbox.

always uses the most recently updated price.

<!-- TODO:
Let's check to see whether there are alternative/automated ways to rebuild VAT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, there isn't any such thing. :)

### Multiple storefronts

Administrators can configure each storefront's "Default currency" and "Tax
Country for Empty Carts" values from the **Settings -> Store** page in the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Tax Country for Empty Carts is the same as cart_tax_country_iso, and here it sounds like they are two different things. I suggest merging this with the previous section?

Country for Empty Carts" values from the **Settings -> Store** page in the
`solidus_backend` admin.

You can customize Solidus's pricing behaviour by creating a custom
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe reiterate that VAT and pricing are intricately connected, which is why you're making this point here.

# Value-added tax (VAT)

Many countries have what is referred to as a value-added tax (VAT). In these
cases, the tax is typically included in the price of each item. This means that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not "typically" included, it's just always included.


Many countries have what is referred to as a value-added tax (VAT). In these
cases, the tax is typically included in the price of each item. This means that
no additional tax needs to be applied during checkout. However, many tax
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much all jurisdictions do that.


## Example order with multiple VAT rates

In the following example, we will still refer to VAT as "adjustments",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence sounds like you shudder lightly at the implementation. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just initially confused, since VAT would never "adjust" the price. Wanted to make sure it was clear for everyone!

```
£17.99 – 1 x T-shirt
£19.99 – 1 x T-shirt
£1.81 – Clothing tax (5%)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that a tab? Should it be a table instead?

£19.99 – 1 x T-shirt
£16.99 – 1 x Power adapter
£1.81 – Clothing tax (5%)
£1.54 – Consumer electronics tax (10%)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh-oh, the indentation is off here. Otherwise I really like the receipts as visualizers of what's happening.

@benjaminwil benjaminwil force-pushed the taxation_documentation branch from e02fc8c to 8f05933 Compare November 28, 2017 17:12
@benjaminwil
Copy link
Contributor Author

@mamhoff I've fixed the outstanding issues per your review. 👍 Please re-review when you get the chance.

Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jhawthorn jhawthorn merged commit 4cc17e5 into solidusio:master Jan 3, 2018
@benjaminwil benjaminwil deleted the taxation_documentation branch April 30, 2018 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants