Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update documentation for taxes
Maciej Korycinskid670b8f8f464
diff --git a/docs/gettingstarted/configuration.rst b/docs/gettingstarted/configuration.rstindex 6116eda1d5..1de479a11b 100644--- a/docs/gettingstarted/configuration.rst+++ b/docs/gettingstarted/configuration.rst@@ -114,3 +114,38 @@ Environment variablesSet this to ``False`` for speedy performance, which is recommended for production.Every image should come with a pre-warm to ensure they'recreated and available at the appropriate URL.++.. _tax_environment_variables:+Tax variables+^^^^^^^^^^^^^++``VATLAYER_ACCESS_KEY``+ Access key to `vatlayer API <https://vatlayer.com/>`_. Enables VAT support within European Union.++ To update the tax rates run the following command at least once per day:++ .. code-block:: console++ $ python manage.py get_vat_rates++``AVATAX_USERNAME_OR_ACCOUNT``+ Avalara supports two ways of authentication - (``username``, ``password``) and (``account_id``, ``license``). This+ field stores Avalara's ``username`` or Avalara's ``account``.+++``AVATAX_PASSWORD_OR_LICENSE``+ Avalara supports two ways of authentication - (``username``, ``password``) and (``account_id``, ``license``). This+ field stores Avalara's ``password`` or Avalara's ``license``.+++``AVATAX_USE_SANDBOX``+ ``True`` when ```DEBUG`` is set to ``True``. Determines if Saleor should use Avatax sandbox API.+++``AVATAX_COMPANY_NAME``+ Default "DEFAULT". Avalara needs to receive company code. Some more complicated systems can use more than one company+ code, in that case, this variable should be changed based on data from Avalara's admin panel.+++``AVATAX_AUTOCOMMIT``+ Default ``False``. Determines, if all transactions sent to Avalara should be committed by default.diff --git a/docs/guides/taxes.rst b/docs/guides/taxes.rstindex d24c3975e9..29cc3d1c22 100644--- a/docs/guides/taxes.rst+++ b/docs/guides/taxes.rst@@ -1,12 +1,7 @@Taxes=====-Saleor gives a possibility to configure taxes. It can be done in dashboard ``Taxes`` tab.--Taxes are charged according to the rates applicable in the country to which the order is delivered. If tax rate set for the product is not available, standard tax rate is used by default.--For now, only taxes in European Union are handled.-+Saleor gives a possibility to configure taxes. It supports external tax provides: ``Avarala``, ``Vatlayer``. Currently only one provider can be enabled at the same time.Configuring taxes-----------------@@ -19,21 +14,30 @@ There are three ways in which you can configure taxes:#. Show gross prices to customers in the storefront- If selected, prices displayed for customers in storefront will be gross. Taxes will be properly calculated at checkout. Changing this setting has no effect on displaying orders placed in the past.+ If selected, prices displayed for customers in storefront will be gross (only ``Vatlayer``). Taxes will be properly calculated at checkout. Changing this setting has no effect on displaying orders placed in the past.#. Charge taxes on shipping ratesIf selected, standard tax rate will be charged on shipping price.+Vatlayer+--------++Configuration can be done in dashboard ``Taxes`` tab.++Taxes are charged according to the rates applicable in the country to which the order is delivered. If tax rate set for the product is not available, standard tax rate is used by default.++Vatlayer handles taxes only in European Union.+Tax rates preview------------------+^^^^^^^^^^^^^^^^^You can preview tax rates in dashboard ``Taxes`` tab. It lists all countries taxes are handled for. You can see all available tax rates for each country in its details view.Fetching taxes---------------+^^^^^^^^^^^^^^Assuming you have provided a valid ``VATLAYER_ACCESS_KEY``, taxes can be fetched via following command:@@ -49,3 +53,28 @@ Fetching taxesBy default, Saleor is making requests to the VatLayer API through HTTP (insecure),if you are using a paid VatLayer subscription, you may want to set the settings ``VATLAYER_USE_HTTPS`` to ``True``.+++Avalara+-------++All configuration and account setup should be done on the Avalara's admin panel. Saleor uses standard Avalata's API to fetch tax codes, calculate taxes during the checkout process and transfer data directly to the Avalara's system.++Configuration+^^^^^^^^^^^^^++Only basic data needs to be provided on Saleor side. You need to fill up variables:+``AVATAX_USERNAME_OR_ACCOUNT``, ``AVATAX_PASSWORD_OR_LICENSE``, ``AVATAX_USE_SANDBOX``, ``AVATAX_COMPANY_NAME``, ``AVATAX_AUTOCOMMIT``, (:ref:`see description of variables.<tax_environment_variables>`)+++Avalara requires a company address to properly calculate taxes.+The address must be assigned in the dashboard's general section.++.. warning::+ Avalara will not work without company address provided in the dashboard.+++Tax codes+^^^^^^^^^+Avalara has own system for classification of product type and expected taxes. On Saleor side, store owner needs to assign Avalara's tax code to the given product type or product itself. If you skip this step, Saleor will use common code for all products (which is not recommended).+Assigning a tax code can be done from dashboard in product type or product section. Both of these sections have a field for assigning tax code for enabled tax gateway.