Cambios solicitados

This commit is contained in:
Juan Pablo Vial
2025-04-08 18:30:14 -04:00
parent 12a4831887
commit 98b18fab3e
4 changed files with 62 additions and 22 deletions

View File

@ -25,13 +25,14 @@
unit.promotions?.forEach(promotion => {
amount /= 1/(1 - promotion.amount)
})
amount /= 1/(1 - this.commission)
amount = 1 - amount
prices.push({
id: unit.id,
base: price,
commission: this.commission,
broker: price / (1 - this.commission),
amount,
final: price / (1 - amount)
final: price / (1 - this.commission) / (1 - amount)
})
})
return prices