Skip to content

Commit 1bdf602

Browse files
This fixes the discount_ calculation logic and promotion tax inclusiveness calculation (#12960)
* This fixes the discount_ calculation logic * This fixes the adjustment to be handled as a subtotal value in every calculation and applies the tax inclusive logic on the promotion value itself * Added some testcases and revoked some changes to improve testing output * Fixed a test case based on feedback * Corrected promotion/admin test cases * Corrected cart/store test case * Improved cart/store test cases for more robust promotion testing considering tax inclusion flags * Remove unnessary changes as adjustments now automatically are subtotals and therefore the tax inclusive flag does not need to be applied again * Remove adjustments->is_tax_inclusive usage everywhere * Migration script to remove is_tax_inclusive in cart line item adjustment * Forgot to adjust one more testcase * Corrections based on fPolic feedback * Refactored PR to consider feedback from oliver * Added more testcases for promotion in cart --------- Co-authored-by: Oli Juhl <[email protected]>
1 parent 75320e7 commit 1bdf602

File tree

11 files changed

+1076
-119
lines changed

11 files changed

+1076
-119
lines changed

.changeset/pink-baboons-wash.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@medusajs/promotion": patch
3+
"@medusajs/core-flows": patch
4+
"integration-tests-http": patch
5+
"@medusajs/cart": patch
6+
"@medusajs/types": patch
7+
"@medusajs/utils": patch
8+
"@medusajs/medusa": patch
9+
---
10+
11+
This fixes the discount\_ calculation logic and promotion tax inclusiveness calculation

0 commit comments

Comments
 (0)