aeat.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 RegistryModeloObservation rows.

resolve_iva_compensation_annual_partition_binding_values(revision, observations, *, filing_year)[source]

Resolve Modelo 390 annual compensation bindings from filed M303 states.

Parameters:
Return type:

dict[TypeAliasType, Decimal]

class IvaCompensationAnnualPartitionSourceResolver(*, repository=None, registry_snapshot=None)[source]

Bases: object

Resolve Modelo 390 boxes 97 / 662 from the IVA compensation FIFO partition.

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

CalculationSourceResolution

Parameters:

context (CalculationSourceContext)