01.04.26
This commit is contained in:
@@ -72,7 +72,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
|||||||
Decimal('250.00'))
|
Decimal('250.00'))
|
||||||
|
|
||||||
def test_get_strategy_mtm_price_returns_unit_price(self):
|
def test_get_strategy_mtm_price_returns_unit_price(self):
|
||||||
'strategy mtm price exposes the unit valuation price'
|
'strategy mtm price exposes the raw unit valuation price'
|
||||||
strategy = Mock(
|
strategy = Mock(
|
||||||
scenario=Mock(
|
scenario=Mock(
|
||||||
valuation_date='2026-03-29',
|
valuation_date='2026-03-29',
|
||||||
@@ -90,7 +90,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
|||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
valuation_module.Valuation._get_strategy_mtm_price(strategy, line),
|
valuation_module.Valuation._get_strategy_mtm_price(strategy, line),
|
||||||
Decimal('25.0000'))
|
Decimal('100.0000'))
|
||||||
|
|
||||||
def test_parse_numbers_supports_inline_and_legacy_separators(self):
|
def test_parse_numbers_supports_inline_and_legacy_separators(self):
|
||||||
'parse_numbers keeps supporting inline entry and legacy separators'
|
'parse_numbers keeps supporting inline entry and legacy separators'
|
||||||
|
|||||||
@@ -144,9 +144,6 @@ class ValuationBase(ModelSQL):
|
|||||||
value = Decimal(strategy._get_matrix_price(
|
value = Decimal(strategy._get_matrix_price(
|
||||||
comp, line, scenario.valuation_date))
|
comp, line, scenario.valuation_date))
|
||||||
|
|
||||||
if comp.ratio:
|
|
||||||
value *= Decimal(comp.ratio) / Decimal(100)
|
|
||||||
|
|
||||||
total += value
|
total += value
|
||||||
|
|
||||||
return round(total, 4)
|
return round(total, 4)
|
||||||
|
|||||||
Reference in New Issue
Block a user