-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): OrderItem.unitPrice now _always_ excludes tax
Relates to #467. This change means that storefronts do not need to do any tax calculations and can reliably list `unitPrice` and `unitPriceWithTax` and know that the actual net/gross prices are being listed. BREAKING CHANGE: The `OrderItem.unitPrice` is now _always_ given as the net (without tax) price of the related ProductVariant. Formerly, it was either the net or gross price, depending on the `pricesIncludeTax` setting of the Channel. If you have existing Orders where `unitPriceIncludesTax = true`, you will need to manually update the `unitPrice` value *before* running any other migrations for this release. The query will look like: `UPDATE order_item SET unitPrice = ROUND(unitPrice / ((taxRate + 100) / 100)) WHERE unitPriceIncludesTax = 1`
- Loading branch information
1 parent
a53f27e
commit 6e2d490
Showing
10 changed files
with
95 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.