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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user