This commit is contained in:
2026-06-17 12:25:21 +02:00
parent ee183e23c5
commit a754e15e32
6 changed files with 97 additions and 63 deletions

View File

@@ -612,24 +612,24 @@ class MtmStrategy(ModelSQL, ModelView):
if comp.price_source_type == 'curve' and comp.price_index:
value = Decimal(
comp.price_index.get_price(
dt,
line.unit,
self.currency,
last=scenario.use_last_price
)
)
comp.price_index.get_price(
dt,
line.unit,
self.currency,
relative_last=scenario.use_last_price
)
)
elif comp.price_source_type == 'matrix' and comp.price_matrix:
value = self._get_matrix_price(comp, line, dt)
elif comp.price_source_type == 'fixed':
value = Decimal(comp.get_price(
dt,
line.unit,
self.currency,
last=scenario.use_last_price
))
value = Decimal(comp.get_price(
dt,
line.unit,
self.currency,
relative_last=scenario.use_last_price
))
if comp.ratio:
value *= Decimal(comp.ratio) / Decimal(100)