Skip to content

Commit

Permalink
ENH: Add additional members to AocType and GroupOfContract
Browse files Browse the repository at this point in the history
  • Loading branch information
fumitoh committed Jul 8, 2023
1 parent c750be4 commit 8f9cdfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lifelib/libraries/ifrs17a/ifrs17/DataStructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ class VariableType(KeyedOrderedDimension):


### AoC Variable Type
@_dataclass
class AocType(VariableType):
pass
PnlType: str


AocStep = _namedtuple('AocStep', ['AocType', 'Novelty'])
Expand Down Expand Up @@ -318,6 +319,7 @@ class GroupOfContract(DataNode):
Portfolio: str
YieldCurveName: str
Partner: str
IsReinsurance: bool


@_dataclass(eq=False)
Expand Down
4 changes: 3 additions & 1 deletion lifelib/libraries/ifrs17a/ifrs17/Importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ def _FromDataSetGroupOfContracts(dataset, datarow):
Profitability=datarow["Profitability"],
Portfolio=pf,
YieldCurveName=datarow["YieldCurveName"] if "YieldCurveName" in dataset.Tables["GroupOfInsuranceContract"].columns else '',
Partner=''
Partner='',
IsReinsurance=False
)

return ExtendGroupOfContract(gic, datarow)
Expand Down Expand Up @@ -419,6 +420,7 @@ def _FromDataSetGroupOfReinsuranceContract(dataset, datarow):
Portfolio=pf,
Partner=datarow["Partner"],
YieldCurveName=datarow["YieldCurveName"] if "YieldCurveName" in dataset.Tables["GroupOfInsuranceContract"].columns.values else '',
IsReinsurance=True
)
return ExtendGroupOfContract(gric, datarow)

Expand Down

0 comments on commit 8f9cdfb

Please sign in to comment.