Skip to content

Commit

Permalink
Merge pull request #6685 from TheMadeleine/docs/book/taxes
Browse files Browse the repository at this point in the history
[Documentation][Book] Taxation - included in price examples
  • Loading branch information
pjedrzejewski committed Nov 10, 2016
2 parents 7fd11cb + 42f06b3 commit fd2cb28
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions docs/book/taxation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,28 @@ TaxRates included in price

The **TaxRate** entity has a field for configuring if you would like to have taxes included in the price of a subject or not.

If you have a TaxCategory with a 10% TaxRate *includedInPrice*, then the price shown on the ProductVariant in that
TaxCategory will be increased by 10% all the time.
If you have a TaxCategory with a 23% VAT TaxRate *includedInPrice* (``$taxRate->isIncludedInPrice()`` returns ``true``),
then the price shown on the ProductVariant in that TaxCategory will be increased by 23% all the time. See the Behat scenario below:

If the TaxRate *will not be included* then the price of ProductVariant will be shown without taxes, but when this
ProductVariant will be added to cart taxes will be shown in the Taxes Total in the cart.
.. code-block:: text
Given the store has included in price "VAT" tax rate of 23%
And the store has a product "T-Shirt" priced at "$10.00"
When I add product "T-Shirt" to my cart
Then my cart total should be "$10.00"
And my cart taxes should be "$1.87"
If the TaxRate *will not be included* (``$taxRate->isIncludedInPrice()`` returns ``false``)
then the price of ProductVariant will be shown without taxes, but when this ProductVariant will be added to cart taxes will be shown in the Taxes Total in the cart.
See the Behat scenario below:

.. code-block:: text
Given the store has excluded from price "VAT" tax rate of 23%
And the store has a product "T-Shirt" priced at "$10.00"
When I add product "T-Shirt" to my cart
Then my cart total should be "$12.30"
And my cart taxes should be "$2.30"
How to create a TaxRate programmatically?
'''''''''''''''''''''''''''''''''''''''''
Expand Down

0 comments on commit fd2cb28

Please sign in to comment.