fix(promotion): check currency when computing actions for promotions (#13084)

* fix(promotion): check currency when computing actions for promotions

* chore: fix tests

* chore: fix more specs
This commit is contained in:
Riqwan Thamir
2025-07-31 11:41:07 +02:00
committed by GitHub
parent 54a74b0215
commit 75320e744f
12 changed files with 152 additions and 69 deletions
@@ -520,13 +520,17 @@ export default class PromotionModuleService
continue
}
const isCurrencyCodeValid =
!isDefined(applicationMethod.currency_code) ||
applicationContext.currency_code === applicationMethod.currency_code
const isPromotionApplicable = areRulesValidForContext(
promotionRules,
applicationContext,
ApplicationMethodTargetType.ORDER
)
if (!isPromotionApplicable) {
if (!isPromotionApplicable || !isCurrencyCodeValid) {
continue
}