fix: product discounts are based on amount
This commit is contained in:
parent
0bce2ff74a
commit
cbb9e180bf
@ -74,7 +74,7 @@ export const setCustomTariffsUserValue = (
|
||||
const amount = state.userValuesMap[serviceKey]?.[privilege._id] ?? 0
|
||||
priceWithoutDiscounts += privilege.price * amount
|
||||
|
||||
const discount = findPrivilegeDiscount(privilege.privilegeId, privilege.price * amount, discounts)
|
||||
const discount = findPrivilegeDiscount(privilege.privilegeId, amount, discounts)
|
||||
priceAfterDiscounts += privilege.price * amount * findDiscountFactor(discount)
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user