aeat.domain.calculations.registry._applicability_modelo202 module

Modelo 202 applicability modality gate.

The full-profile entry point reads TaxpayerProfile entity type and INCN facts, then delegates to the raw-input modality rule used by calculation.

class Modelo202Modality(*values)[source]

Bases: StrEnum

The pago-fraccionado modality available to a Modelo 202 filer.

ART_40_2_OPTIONAL
ART_40_3_MANDATORY
INCOMPLETE
class Modelo202ModalityVerdict(**data)[source]

Bases: BaseModel

The derived Modelo 202 modality verdict and its grounding.

Parameters:
modality: Modelo202Modality
reason: _OperatorReason
legal_refs: tuple[LegalRefId, ...]
modelo_202_modality_from_inputs(*, entity_type, incn_prior_12_months)[source]

Derive the Modelo 202 modality from the two raw inputs (entity type + INCN).

The SINGLE modality definition, callable WITHOUT a full TaxpayerProfile so the calculation engine can evaluate it off the wizard-free profile projection (record_to_path_values) in a non-CLI context where the wizard SETUP_FLOW catalogue is not registered. No fork: derive_modelo_202_modality() delegates here.

Returns:

Derived modality, explanation, and legal grounding.

Return type:

Modelo202ModalityVerdict

Parameters:
derive_modelo_202_modality(profile)[source]

Derive the Modelo 202 pago-fraccionado modality and return a Modelo202ModalityVerdict.

Reads TaxpayerProfile entity type and INCN, then delegates the rule to modelo_202_modality_from_inputs() (the single definition).

Return type:

Modelo202ModalityVerdict

Parameters:

profile (TaxpayerProfile)