diff --git a/packages/medusa/src/services/discount.ts b/packages/medusa/src/services/discount.ts index c4b55f53eb..c6c1805344 100644 --- a/packages/medusa/src/services/discount.ts +++ b/packages/medusa/src/services/discount.ts @@ -634,12 +634,9 @@ class DiscountService extends TransactionBaseService { }) let fullItemPrice = lineItem.unit_price * lineItem.quantity - if ( - this.featureFlagRouter_.isFeatureEnabled( - TaxInclusivePricingFeatureFlag.key - ) && - lineItem.includes_tax - ) { + const includesTax = this.featureFlagRouter_.isFeatureEnabled(TaxInclusivePricingFeatureFlag.key) && lineItem.includes_tax + + if (includesTax) { const lineItemTotals = await this.newTotalsService_ .withTransaction(transactionManager) .getLineItemTotals([lineItem], { @@ -664,6 +661,7 @@ class DiscountService extends TransactionBaseService { const totals = await this.newTotalsService_.getLineItemTotals( discountedItems, { + includeTax: includesTax, calculationContext, } )