aeat.application.calculations._bienes_inversion_regularizacion module

Advisory projection for the capital-goods IVA regularización (LIVA arts. 107-110).

Builds the non-blocking source diagnostics the calculate path surfaces for Modelo 303 casilla 43 / Modelo 390 casilla 63: the ordinary annual art-109 comparison for in-window, non-disposed goods (build_bienes_inversion_regularizacion_advisory()), and the art-110 single (“única”) disposal regularización for a good disposed of during the filing year (build_bienes_inversion_transmision_advisory()). The source resolver projects the same register-backed amount into the governed M303/M390 binding targets when the current-year definitive prorrata percentage is available; the advisory functions remain as the visible fallback for operator review.

The pure projections never derive the definitive percentage. M303 supplies it from the registry materialisation seam, while M390 may read the stamped current year M303 settlement observation that already owns iva.prorrata-porcentaje.

See also

ModeloRevision

Compiled revision whose bindings the advisory functions resolve their Modelo 303 / 390 output casillas against.

CASILLA_REGULARIZACION_BIENES_INVERSION

The Modelo 303 casilla the register feeds. Deducciones block, “Regularización de bienes de inversión” (LIVA arts. 107-110).

build_bienes_inversion_regularizacion_advisory(register, *, regularizacion_year, prorrata_definitiva_by_identifier)[source]

Project the register and build the fallback advisory diagnostic.

Returns the register projection plus a non-blocking CalculationSourceDiagnostic when the register holds in-window, art-108-eligible, non-disposed goods for regularizacion_year — so a taxpayer who owns capital goods in their regularisation window is alerted that casilla 43 may be due, rather than silently filing zero. When no in-window goods exist the diagnostic is None (nothing to regularise, no noise). A good disposed of at or before regularizacion_year is excluded here and routed instead through build_bienes_inversion_transmision_advisory().

The diagnostic message names the in-window count, the number of goods whose regularización could be computed (a definitive percentage was supplied), the number still pending a definitive percentage, and the proposed casilla-43 value.

Parameters:
Return type:

tuple[RegistroRegularizacionResult, CalculationSourceDiagnostic | None]

Returns:

(projection, diagnostic) where projection is a RegistroRegularizacionResult; the diagnostic is None when there is nothing to regularise.

build_bienes_inversion_transmision_advisory(register, *, disposal_year, cuota_devengada_entrega_by_identifier=None)[source]

Project the register’s art-110 disposals and build the advisory diagnostic.

Returns the register-wide transmisión projection plus a non-blocking CalculationSourceDiagnostic when the register holds a good disposed of in disposal_year with window time remaining — so a taxpayer who sold, transmitted, or otherwise disposed of a tracked capital good is alerted that the art-110 single regularización is due on casilla 43, rather than silently filing zero. Unlike the annual advisory, this projection carries no pending state: every fact art-110 needs (acquisition-year percentage, cuota soportada, disposal regime) is already on the record, so the diagnostic always names a concrete proposed figure (the regla-1ª cap is applied only when the caller supplies the disposal’s own cuota devengada).

Parameters:
Return type:

tuple[RegistroTransmisionesResult, CalculationSourceDiagnostic | None]

Returns:

(projection, diagnostic) where projection is a RegistroTransmisionesResult; the diagnostic is None when no disposal falls in disposal_year.

class BienesInversionRegularizacionSourceResolver(*, current_year_values=None, missing_current_year_casilla_ids=(), unresolved_current_year_casilla_ids=(), register_repository=None, observation_repository=None)[source]

Bases: object

Resolve capital-goods regularizacion bindings from the profile register.

Parameters:
resolver_id
owned_sources: tuple[BindingSourceKind, ...]
resolve(context)[source]
Return type:

CalculationSourceResolution

Parameters:

context (CalculationSourceContext)