cadrumo.domain.contribuyente.family_fact_context module

Typed governed-fact resolution context for family calculations.

class FamilyFactResolutionContext(authority, filing_period, devengo_date)[source]

Bases: object

Authority and explicit filing/devengo coordinates for family facts.

Parameters:
authority: GovernedFactSource
filing_period: date
devengo_date: date
integer(fact_id)[source]

Resolve an integer-valued family governed fact.

Return type:

int

Parameters:

fact_id (str)

decimal(fact_id)[source]

Resolve a Decimal-valued family governed fact.

Return type:

Decimal

Parameters:

fact_id (str)

resolved_scalar(fact_id)[source]

Resolve a family fact on its declared temporal coordinate.

The mapping is deliberately closed: consumers cannot accidentally use the filing coordinate for a fact whose declaration moves to devengo.

Return type:

ResolvedScalarFact

Parameters:

fact_id (str)