cadrumo.application.modelo.prior_payment_advisory module

Calculate-path advisories around the Modelo 130 prior-payment carry.

Modelo 130 is cumulative from the start of the ejercicio, and its prior-payment casilla carries the positive part of each same-ejercicio prior trimestre’s result, minored by that trimestre’s minoración (RD 439/2007 art. 110). This module does not compute the carry. It raises two non-blocking advisories around it, with every casilla identity read from the dated m130-prior-payment-verification-mapping declaration:

  • prior_payment_not_deducted: a non-first trimestre with positive cumulative income still carries a zero prior payment although a prior trimestre was filed, so the carry could not populate.

  • prior_payment_minoracion_not_captured: a carried prior filing declares its positive part but no minoración entry. The carry treats the absence as zero; the advisory keeps that gap visible, while a filed zero stays silent.

A first trimestre, or a quarter with no stored prior filing, has nothing to carry and raises neither advisory.

collect_prior_payment_not_deducted_diagnostics(revision, casilla_values, *, modelo, period_token, filing_year, observation_repository, operation=None)[source]

Return an advisory when a non-first trimestre deducts no prior payment despite a prior filing.

Core types: ModeloRevision.

Return type:

tuple[CalculationSourceDiagnostic, ...]

Parameters:
collect_prior_payment_minoracion_not_captured_diagnostics(revision, *, modelo, period_token, filing_year, observation_repository, operation=None)[source]

Return an advisory when a carried prior filing declares no minoración entry.

Core types: ModeloRevision.

Return type:

tuple[CalculationSourceDiagnostic, ...]

Parameters: