cadrumo.domain.prorrata_register package¶
Per-ejercicio cross-period IVA prorrata register (LIVA arts. 102-106).
The provisional-to-definitive IVA prorrata lifecycle is inherently cross-year: under prorrata general only the deduction percentage of soportado is deductible in each liquidation period (art. 104.Uno); the percentage provisionally applicable each year is the prior year’s definitive (art. 105.Uno), with the regulated alternatives of an AEAT-authorised provisional (art. 105.Dos) and the inicio-de-actividades proposed percentage (art. 105.Tres via art. 111.Dos); the last liquidation of the year computes the definitive prorrata from the year’s actual operations and regularises the provisional deductions (art. 105.Cuatro).
This module is the CARRY HOME for that lifecycle: a durable per-ejercicio
ProrrataRegister, one ProrrataRegisterEntry per
(ejercicio, sector) carrying the regime, the provisional percentage in force
with its regulated ProrrataProvisionalProvenance, and — once
settled — the definitive percentage with the annual volume inputs it derived
from. The pure precedence-ladder resolver
(resolve_provisional_percentage()) selects the in-force provisional
percentage among candidate provenances (authorised/inicio outranking the carried
prior definitive) and returns a visible unresolved state rather than any
fabricated default — no percentage is ever assumed.
This is a taxpayer-fact store, sibling to domain.bienes_inversion: it
holds the per-ejercicio percentages and their provenance, never the regulatory
constants. The prorrata compute substrate (domain.iva:
compute_prorrata_definitiva_anual, compute_regularizacion_prorrata_anual)
is consumed at settlement, not re-implemented here, and this module reads no
secure-object store — the seed, in-year apportionment, and settlement write-back
live in the application layer.
See also
adapters.persistence.profile.prorrata_registerFINANCIAL secure-object repository that stores the register singleton.
domain.ivaLegal prorrata substrate that computes the definitive percentage from annual volumes and the art. 105.Cuatro regularisation cuota.
domain.bienes_inversionSibling per-taxpayer-fact register whose shape this mirrors.
Submodules¶
- cadrumo.domain.prorrata_register.protocols module
- cadrumo.domain.prorrata_register.register module
ProrrataRegisterErrorProrrataRegisterValidationErrorPRORRATA_REGISTER_SCHEMA_VERSIONProrrataEspecialTransitionEvidenceSectorDefinitionProrrataActivityRowProrrataActivityRow.ejercicioProrrataActivityRow.activity_idProrrataActivityRow.slotProrrataActivityRow.cnae_codeProrrataActivityRow.operaciones_totalProrrataActivityRow.operaciones_con_derechoProrrataActivityRow.prorrata_typeProrrataActivityRow.percentageProrrataActivityRow.evidence_reference
ProrrataRegisterEntryProrrataRegisterEntry.ejercicioProrrataRegisterEntry.regimeProrrataRegisterEntry.especial_transitionProrrataRegisterEntry.sector_idProrrataRegisterEntry.interruptedProrrataRegisterEntry.provisional_percentageProrrataRegisterEntry.provisional_provenanceProrrataRegisterEntry.authorisation_referenceProrrataRegisterEntry.definitive_percentageProrrataRegisterEntry.definitive_volume_con_derechoProrrataRegisterEntry.definitive_volume_sin_derechoProrrataRegisterEntry.source_observation_refProrrataRegisterEntry.source_registry_snapshot_refsProrrataRegisterEntry.schema_version
ProrrataProvisionalResolutionresolve_provisional_percentage()ProrrataRegisterProrrataRegister.schema_versionProrrataRegister.entriesProrrataRegister.sector_definitionsProrrataRegister.activity_rowsProrrataRegister.is_sectorizedProrrataRegister.sector_ids()ProrrataRegister.sector_definition_for()ProrrataRegister.entries_for_ejercicio()ProrrataRegister.has_complete_current_entry_coverage()ProrrataRegister.activity_rows_for_ejercicio()ProrrataRegister.requires_activity_rows_for()ProrrataRegister.activity_rows_complete_for()ProrrataRegister.entry_for()ProrrataRegister.resolve_provisional()