fix: correct calculations of subtotal for shipping option requirements (#7089)

* fix: correct calculations of subtotal for shipping option requirements

* Add changeset
This commit is contained in:
Kevin Furmanski
2024-04-29 10:11:43 +02:00
committed by GitHub
parent d2393f004e
commit 82cb6cfd36
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix: correct calculations of subtotal for shipping option requirements

View File

@@ -398,7 +398,7 @@ class ShippingOptionService extends TransactionBaseService {
)
}
const amount = option.includes_tax ? cart.total! : cart.subtotal!
const amount = option.includes_tax ? (cart.subtotal! + cart.item_tax_total!) : cart.subtotal!
const requirementResults: boolean[] = option.requirements.map(
(requirement) => {