cadrumo.application.calculations.iva_compensation_annual_partition module¶
Modelo 390 IVA compensation annual partition source resolver.
The resolver reads a RegistrySnapshot
for the annual Modelo 390 revision, inspects its
ModeloRevision bindings owned by
IVA_COMPENSATION_ANNUAL_PARTITION, and
derives the two annual compensation partition amounts from filed Modelo 303
ObservationEnvelopePayload records.
- period_state_from_303_envelope(envelope, *, operation)[source]¶
Build one FIFO state from a validated filed Modelo 303 envelope.
- Return type:
- Parameters:
envelope (ObservationEnvelopePayload)
operation (PinnedAuthorityOperation)
- resolve_iva_compensation_annual_partition_binding_values(revision, envelopes, *, filing_year, operation)[source]¶
Resolve Modelo 390 annual compensation bindings from filed M303 states.
- Parameters:
revision (
ModeloRevision) – The annual Modelo 390ModeloRevisionwhose partition bindings declare the target output slots.envelopes (
tuple[ObservationEnvelopePayload,...]) – Filed, already-normalized Modelo 303ObservationEnvelopePayloadrecords used to reconstruct the compensation FIFO state.filing_year (
int) – Annual filing year used to select same-year Modelo 303 observations.operation (
PinnedAuthorityOperation) – Caller-owned generation-pinned authority operation used to validate the source revisions.
- Return type:
- class IvaCompensationAnnualPartitionSourceResolver(*, operation, repository, registry_snapshot=None)[source]¶
Bases:
objectResolve Modelo 390 boxes 97 / 662 from the IVA compensation FIFO partition.
- Parameters:
operation (PinnedAuthorityOperation)
repository (CalculationObservationRepositoryProtocol)
registry_snapshot (RegistrySnapshot | None)
-
owned_sources:
ClassVar[tuple[BindingSourceKind,...]]¶
- resolve(context)[source]¶
Resolve the Modelo 390 boxes 97 / 662 IVA compensation FIFO partition for
context.- Return type:
- Returns:
An empty resolution when the revision declares no such requirement, a degraded resolution on repository failure, or the resolved
CalculationSourceResolution.- Parameters:
context (CalculationSourceContext)