cadrumo.domain.calculations.registry.iva_compensation_annual_partition_bindings module

The annual IVA-compensation partition provider.

Modelo 390’s boxes 97 and 662 are two halves of ONE FIFO partition of the compensation the taxpayer carried through the year, which is why both read the same four Modelo 303 state casillas over the same four quarters and differ only in which half of the partition they take.

class IvaCompensationAnnualPartition(*values)[source]

Bases: StrEnum

Which half of the annual IVA compensation partition a binding reads.

LAST_PERIOD_AMOUNT
GENERATED_NOT_IN_LAST_AMOUNT
IvaCompensationAnnualPartitionValue

The same vocabulary for a strict model field.

alias of Literal[LAST_PERIOD_AMOUNT, GENERATED_NOT_IN_LAST_AMOUNT]

M303_COMPENSATION_AVAILABLE_CASILLA: CasillaId

The Modelo 303 and 390 casillas that carry the compensation state a filing leaves behind. They are registry vocabulary, so they are declared once here and read from here by every consumer rather than re-spelled per caller.

class IvaCompensationAnnualPartitionProvider(**data)[source]

Bases: BaseModel

Selector for Modelo 390 AEAT boxes 97 / 662 as one FIFO partition.

Parameters:

data (Any)

kind: Literal[BindingSourceKind.IVA_COMPENSATION_ANNUAL_PARTITION]
source_modelo: Literal['303']
source_casilla_ids: tuple[CasillaId, ...]
source_periods: tuple[str, ...]
partition_output: IvaCompensationAnnualPartitionValue