Add Fixed type component
This commit is contained in:
@@ -356,6 +356,14 @@ class ValuationBase(ModelSQL):
|
||||
value = Decimal(strategy._get_matrix_price(
|
||||
comp, line, scenario.valuation_date))
|
||||
|
||||
elif comp.price_source_type == 'fixed':
|
||||
value = Decimal(comp.get_price(
|
||||
scenario.valuation_date,
|
||||
line.unit,
|
||||
strategy.currency,
|
||||
last=scenario.use_last_price
|
||||
))
|
||||
|
||||
if comp.ratio:
|
||||
value *= Decimal(comp.ratio) / Decimal(100)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user