docs: added dividers + see also section (#2899)
This commit is contained in:
1 parent
b0e5769e27
commit
b0ebfd6bcf
100 files changed
+1047
-291
No files matched your search
@@ -21,6 +21,8 @@ This can be useful when some countries have the same currency but have different
|
||||
|
||||
Then, Medusa handles calculating the tax amount using the tax rate and the tax-inclusive price. This is managed in the backend and relayed to accounting and analytics tools.
|
||||
|
||||
---
|
||||
|
||||
## How is Tax Inclusivity Defined
|
||||
|
||||
Tax inclusivity can be toggled for regions, currencies, price lists, and shipping options either during creation or while editing. This is represented by the boolean attribute `includes_tax` available in the entities `Region`, `Currency`, `PriceList`, and `ShippingOption`. By default, this attribute is set to `false`.
|
||||
@@ -54,6 +56,8 @@ When a shipping option is selected, a shipping method is created based on that s
|
||||
|
||||
The `ShippingMethod` entity also has the `includes_tax` attribute. Its value is the same as the value of `includes_tax` of the shipping option the method is associated with.
|
||||
|
||||
---
|
||||
|
||||
## Tax Amount Calculation Formula
|
||||
|
||||
When a price is tax-inclusive, the tax amount is calculated using the following formula:
|
||||
@@ -66,6 +70,8 @@ Where `taxRate` is the tax rate to be applied to the price, and `taxInclusivePri
|
||||
|
||||
For example, if the tax rate is `0.25` and the price of a product is `100`, the resulting tax amount calculated by Medusa will be `0.25 * 100 / 1.25 = 20`.
|
||||
|
||||
---
|
||||
|
||||
## Retrieving Tax Amounts
|
||||
|
||||
This section covers at which point tax amounts are calculated for different entities, how they are calculated when the price is tax inclusive, and what fields can be returned in the endpoints relative to each of the entities.
|
||||
@@ -187,7 +193,9 @@ The relevant fields are:
|
||||
|
||||
During the calculation of the totals of different components of the cart or order, such as shipping or line items, if tax inclusivity is enabled on that component, a process similar to those explained above will be applied to retrieve the total.
|
||||
|
||||
## What’s Next
|
||||
---
|
||||
|
||||
- Learn how to [calculate taxes manually](manual-calculation.md).
|
||||
- [Check out the API reference](https://docs.medusajs.com/api/store/).
|
||||
## See Also
|
||||
|
||||
- [Calculate taxes manually](manual-calculation.md)
|
||||
- [Storefront API reference](/api/store)
|
||||
@@ -8,6 +8,8 @@ By default, taxes are automatically calculated by Medusa during checkout. This b
|
||||
|
||||
If you disable this behavior, you must manually trigger taxes calculation. When taxes are calculated, this means that requests will be sent to the tax provider to retrieve the tax rates.
|
||||
|
||||
---
|
||||
|
||||
## How to Manually Calculate Taxes in Checkout
|
||||
|
||||
This section explores different ways you can calculate taxes based on your purpose.
|
||||
@@ -80,7 +82,9 @@ You can learn how to [retrieve and use services](../services/create-service.md#u
|
||||
|
||||
:::
|
||||
|
||||
## What’s Next
|
||||
---
|
||||
|
||||
- Learn about [tax-inclusive pricing](inclusive-pricing.md).
|
||||
- Learn about available methods in [CartsService](../../../references/services/classes/CartService.md) and [TotalsService](../../../references/services/classes/TotalsService.md).
|
||||
## See Also
|
||||
|
||||
- [Tax-Inclusive Pricing Overview](inclusive-pricing.md)
|
||||
- [CartsService](../../../references/services/classes/CartService.md) and [TotalsService](../../../references/services/classes/TotalsService.md)
|
||||
Reference in new issue
Block a user