fix(pricing): Calculate prices with multiple rule values (#13079)

This commit is contained in:
Oli Juhl
2025-08-05 13:04:55 +02:00
committed by GitHub
parent 8616248adc
commit 02dd83f59a
4 changed files with 202 additions and 35 deletions

View File

@@ -343,6 +343,7 @@ export default class PricingModuleService
/**
* When deciding which price to use we follow the following logic:
* - If the price list is of type OVERRIDE, we always use the price list price.
* - If there are multiple price list prices of type OVERRIDE, we use the one with the lowest amount.
* - If the price list is of type SALE, we use the lowest price between the price list price and the default price
*/
if (priceListPrice) {
@@ -369,6 +370,7 @@ export default class PricingModuleService
}
}
pricesSetPricesMap.set(key, { calculatedPrice, originalPrice })
priceIds.push(
...(deduplicate(