solidus

https://github.com/solidusio/solidus

Ruby

🛒 Solidus, the open-source eCommerce framework for industry trailblazers.

Spree::Tax::TaxHelpers#applicable_rates

Imagine with me this scenario:
You are living in Spain and you have a store which ships to France.
Spain is therefore your default tax rate.
When you ship to Spain, you want the Spanish rate to apply.
When you ship to France, you want the French rate to apply.

Normally, Spree would notice that you have two potentially applicable
tax rates for one particular item.
When you ship to Spain, only the Spanish one will apply.
When you ship to France, you'll see a Spanish refund AND a French tax.
This little bit of code at the end stops the Spanish refund from appearing.

For further discussion, see https://github.com/spree/spree/issues/4397 and https://github.com/spree/spree/issues/4327.

Source | Google | Stack overflow

Edit

git clone [email protected]:solidusio/solidus.git

cd solidus

open core/app/models/spree/tax/tax_helpers.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Spree--Tax--TaxHelpers-applicable_rates-for-pr


# Commit to git

git add core/app/models/spree/tax/tax_helpers.rbgit commit -m "better docs for Spree::Tax::TaxHelpers#applicable_rates"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Spree--Tax--TaxHelpers-applicable_rates-for-pr

hub pull-request


# Celebrate!