cadrumo.domain.calculations.registry.formula_runtime_m100 module¶
Modelo 100 formula evaluators for the registry calculation runtime.
This module owns the Modelo 100 operations that evaluate imputed real-estate
income and the estimación-objetiva agraria índice cascade. The generic
dispatcher in formula_runtime imports these evaluators directly; this
is the canonical home for the Modelo 100 operation family rather than a
forwarding layer.
- evaluate_m100_resolve_renta_inmobiliaria_imputada(expression, ctx)[source]¶
Resolve M100 Art. 85 imputed real-estate income for cadastral-value rows.
M100’s 0083-0089 property row has the cadastral-value branch inputs: value, revised-value checkbox, days at disposal, and the mixed-use percentage/days override. The same row does not carry the no-cadastral substitute base (max of acquisition and administration-checked values), so that branch fails closed instead of inventing a base or silently returning zero for a positive imputation period.
- Return type:
- Parameters:
expression (FormulaExpression)
ctx (_EvalContext)
- evaluate_m100_resolve_eo_agraria_indices_correctores(expression, ctx)[source]¶
Resolve the M100 estimación-objetiva agraria Fase 3ª índices correctores.
Orden HAC/1347/2024, Anexo I instrucción 2.3 (letras a) to h)) fixes the mechanism: the rendimiento neto minorado (Fase 2ª, casilla 1539) is corrected by applying, in sequence, the índice or índices correctores that correspond to the activity — each índice applying “sobre el rendimiento neto minorado o, en su caso, sobre el rectificado por aplicación de los [índices] anteriores”: a sequential cascade over the Anexo’s own letra ordering (a → h), not a single-index pick nor a simultaneous product.
Each índice casilla (1540 to 1547, one per letra a) to h)) is an operator/preparer-declared rate (AEAT Diseño de Registros field type
P012for seven of the eight,Xfor índice 4 — see_m100_eo_agraria_read_indice(), fieldsE5AI1toE5AI8) — the taxpayer reads the applicable índice off the Anexo I table for their activity and enters it directly, mirroring how the M131 estimación-objetiva módulos engine resolves its own índice corrector de exceso. A blank índice casilla resolves to zero (indistinguishable, at this op’s boundary, from “not declared”); because every real índice in the Anexo I table is strictly positive (0,50 to 0,95), a non-positive read is treated as “índice not applied” — the cascade step is skipped (factor of 1, never a fabricated zero-out) rather than multiplying the accumulator by zero. This never over-states nor under-states the reduction: a real but undeclared índice simply goes uncredited, and a declared índice is applied exactly once, in the Anexo’s own order.A non-positive rendimiento neto minorado never receives índices correctores and resolves to the minorado figure unchanged. Índice 9 (mejillón en batea, letra i) is not modelled by this dispatcher: it applies to a separate producto (casilla 0160) outside the 1539→1548 cascade.
- Return type:
- Parameters:
expression (FormulaExpression)
ctx (EvalContext)