cadrumo.application.calculations.m303_regimen_simplificado_annual_summary module¶
Immutable Modelo 303 4T to Modelo 390 0A simplified-regime handoff.
The annual Modelo 390 simplified-regime section is not a relation fold over observations. It consumes one exact, filed-and-current Modelo 303 calculation revision and retains that source identity as a frozen target calculation input.
Core types:
RegistrySnapshot.
- exception M303RegimenSimplificadoAnnualSummaryHandoffError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
CoreValidationErrorRaised when a Modelo 390 annual handoff has no exact filed 303 source.
Roots at
CoreValidationErrorlike every other refusal in this package, so the class binds to the error registry and its refusal carries a code, a category and locale-resolved text. That base already carriesValueError, so the resolver keeps the ancestry its callers were written against.- Parameters:
- Return type:
None
- code¶
- class M303RegimenSimplificadoAnnualSummarySourceResolver(*, registry_snapshot, work_unit_repository, calculation_repository, filing_repository, regimen_simplificado_applies, operation)[source]¶
Bases:
objectResolve the one immutable filed-current 303/4T annual-summary source.
- Parameters:
registry_snapshot (RegistrySnapshot)
work_unit_repository (WorkUnitCatalogueRepositoryProtocol)
calculation_repository (CalculationRevisionCatalogueRepositoryProtocol)
filing_repository (ModeloRecordCatalogueRepositoryProtocol)
regimen_simplificado_applies (bool)
operation (PinnedAuthorityOperation)
-
owned_sources:
ClassVar[tuple[BindingSourceKind,...]]¶
- resolve(context)[source]¶
Assemble exact 74–83 inputs or refuse before target persistence.
- Return type:
- Parameters:
context (CalculationSourceContext)
- validate_persisted_target_revision(*, target_work_unit, target_revision)[source]¶
Re-resolve and compare the immutable handoff before target use.
Calculation stores the carrier only after the target revision id has been derived. Verification, filing, and export re-run this exact source selection so a later source-pointer/evidence/result drift cannot be hidden behind an otherwise valid target-revision hash.
Core types:
CalculationRevision.- Return type:
- Parameters:
target_work_unit (WorkUnit)
target_revision (CalculationRevision)
- validate_m303_regimen_simplificado_annual_summary_target_revision(*, target_work_unit, target_revision, work_unit_repository, calculation_repository, filing_repository, regimen_simplificado_applies, operation)[source]¶
Fail closed when a persisted M390 handoff no longer re-resolves exactly.
Core types:
CalculationRevision.- Return type:
- Parameters:
target_work_unit (WorkUnit)
target_revision (CalculationRevision)
work_unit_repository (WorkUnitCatalogueRepositoryProtocol)
calculation_repository (CalculationRevisionCatalogueRepositoryProtocol)
filing_repository (ModeloRecordCatalogueRepositoryProtocol)
regimen_simplificado_applies (bool)
operation (PinnedAuthorityOperation)