cadrumo.application.prorrata_register.seed module¶
Seed the cross-period prorrata register from stamped prior observations.
The LIVA art. 105.Uno normal provisional percentage is the prior ejercicio’s definitive prorrata. This module locates that percentage in the prior Modelo 303 settlement observation and trusts it only after the observation’s registry revision stamp re-confirms against the law-determined revision for the source period.
See also
ProrrataRegisterEntryRegister record populated with the carried-prior-definitive percentage, provenance, and source-observation identity.
ProrrataProvisionalProvenanceClosed provenance axis whose
CARRIED_PRIOR_DEFINITIVAmember marks the normal LIVA art. 105.Uno seed path.CalculationObservationRepositoryProtocolLocal observation catalogue scanned for prior Modelo 303 settlement observations.
revision_carry_outcome()Shared law-determined gate used to re-confirm the stored
stamped_revision_idbefore trusting the carry.CrossPeriodCleanStateBlockerBlocker vocabulary reused for revision-divergent seed findings.
- class ProrrataPriorDefinitivaSeed(entry, source_modelo, source_filing_year, source_period, source_casilla_id, stamped_revision_id)[source]¶
Bases:
objectA re-confirmed prior-year definitive percentage ready to seed the register.
- Parameters:
entry (ProrrataRegisterEntry)
source_modelo (str)
source_filing_year (int)
source_period (str)
source_casilla_id (CasillaId)
stamped_revision_id (RevisionId)
-
entry:
ProrrataRegisterEntry¶
-
source_casilla_id:
TypeAliasType¶
-
stamped_revision_id:
TypeAliasType¶
- class ProrrataSeedFinding(code, blocking, message, source_modelo, source_filing_year, source_period, stamped_revision_id, selected_revision_id)[source]¶
Bases:
objectOperator-visible seed/cross-check blocker or advisory.
- Parameters:
-
stamped_revision_id:
TypeAliasType¶
- class ProrrataPriorDefinitivaSeedEvaluation(seed, findings=())[source]¶
Bases:
objectSeed resolution plus any blockers or advisories surfaced while resolving it.
- Parameters:
seed (ProrrataPriorDefinitivaSeed | None)
findings (tuple[ProrrataSeedFinding, ...])
-
seed:
ProrrataPriorDefinitivaSeed|None¶
-
findings:
tuple[ProrrataSeedFinding,...]¶
- evaluate_carried_prior_definitiva_seed(*, ejercicio, observation_repository, operation, sector_id=None)[source]¶
Evaluate the carried-prior-definitive seed and surface findings.
Divergent or unreconfirmable revision stamps produce a blocking
registry_revision_divergencefinding and no seed.- Return type:
- Parameters:
ejercicio (int)
observation_repository (CalculationObservationRepositoryProtocol)
operation (PinnedAuthorityOperation)
sector_id (str | None)
- cross_check_prorrata_entry_against_prior_observation(entry, *, observation_repository, operation)[source]¶
Cross-check a register entry against the prior definitive observation.
A carried-prior-definitive entry must match the prior Modelo 303 settlement observation because art. 105.Uno is the normal carry rule. AEAT-authorised and inicio-de-actividades entries are regulated alternatives: when they differ from the prior definitive, the difference is surfaced as a non-blocking notice that names the provenance rather than being silenced.
- Return type:
- Parameters:
entry (ProrrataRegisterEntry)
observation_repository (CalculationObservationRepositoryProtocol)
operation (PinnedAuthorityOperation)