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:
StrEnumThe pago-fraccionado modality available to a Modelo 202 filer.
- ART_40_2_OPTIONAL¶
- ART_40_3_MANDATORY¶
- INCOMPLETE¶
- class Modelo202ModalityVerdict(**data)[source]¶
Bases:
BaseModelThe derived Modelo 202 modality verdict and its grounding.
- Parameters:
modality (Modelo202Modality)
reason (_OperatorReason)
legal_refs (tuple[LegalRefId, ...])
- 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
TaxpayerProfileso the calculation engine can evaluate it off the wizard-free profile projection (record_to_path_values) in a non-CLI context where the wizardSETUP_FLOWcatalogue is not registered. No fork:derive_modelo_202_modality()delegates here.- Returns:
Derived modality, explanation, and legal grounding.
- Return type:
- Parameters:
entity_type (EntityType | None)
incn_prior_12_months (Decimal | None)
- derive_modelo_202_modality(profile)[source]¶
Derive the Modelo 202 pago-fraccionado modality and return a
Modelo202ModalityVerdict.Reads
TaxpayerProfileentity type and INCN, then delegates the rule tomodelo_202_modality_from_inputs()(the single definition).- Return type:
- Parameters:
profile (TaxpayerProfile)