aeat.application.modelo._m210_rate module¶
Modelo 210 IRNR treaty-rate resolution helpers.
The registry formula runtime computes the filing values and emits typed
unresolved outcomes when a Modelo 210 rate cannot be applied directly. This
application helper replays the same single tipo-de-gravamen resolution path over a
RegistrySnapshot: it reads the
m210-tipo-gravamen-2025 baseline table, consults the cross-cutting
ConvenioAuthority treaty projection for
the profile’s country_of_fiscal_residence, and returns either a scalar IRNR
rate or blocking ModeloVerificationFinding records for
deferred baseline coverage or missing treaty rows.
Base-dependent branches — the allocation_domestic_tariff pension delegation and
the pension ceiling — return (None, []) because the live base-aware tariff
path in the registry runtime remains the calculation authority; the sweep keeps the
runtime-computed effective rate for those.
See also
aeat.domain.calculations.registry._formula_runtimeFormula-runtime implementation of
irnr_resolve_tipo_gravamenand the typed M210 unresolved outcomes this application layer converts into findings.aeat.application.modelo._verification_actions.verify_modelo_revision()Verification path that replays this resolver for Modelo 210 observations.
aeat.application.calculations.tests.test_modelo_210_irnr_continuityCross-renta enrollment coverage for the registry-backed M210 engine.
- resolve_m210_rate(profile, tipo_renta, year, snapshot)[source]¶
Resolve the M210 rate for (profile, tipo_renta, year).
The
RegistrySnapshotsupplies them210-tipo-gravamen-2025baseline table and the cross-cuttingConvenioAuthority; theTaxpayerProfilesuppliescountry_of_fiscal_residencefor treaty lookup. Returns(rate, findings)wherefindingscontains blockingModeloVerificationFindingrecords when a required rate is deferred or unavailable.A profile with no treaty country uses the baseline table. A profile with a treaty country must match a treaty override for
(country, tipo_renta)unless the override delegates back to the domestic tariff. The resolver returns no scalar rate for base-dependent branches because those depend on the actual base amount and are computed by the formula runtime.See also
aeat.domain.calculations.registry._formula_runtime_irnr.evaluate_irnr_resolve_tipo_gravamen()aeat.domain.calculations.registry.ConvenioAuthorityaeat.domain.deadlines.TaxpayerProfile- Return type:
- Parameters:
profile (TaxpayerProfile)
tipo_renta (str)
year (int)
snapshot (RegistrySnapshot)