aeat.domain.fincas package¶
Public facade for the LIRPF fincas register.
Per-Finca and per-Arrendamiento register backing factual LIRPF
rental aggregates (arts. 22-24 and 85), the LIRPF art. 23.2 four-tier
auto-resolver introduced by Ley 12/2023, and the LIRPF art. 23.1.f
FincaAmortizacionLedgerEntry multi-year ledger with a per-finca
cost-basis cap. The fincas stem is intentional: this package models the
registral / cadastral unit, while filing targets remain registry-owned.
The main public calculations are compute_finca_aggregates(),
compute_amortization_for_year(), compute_gastos_for_year(), and
resolve_reduccion(). They return typed audit records such as
FincaAggregates, FincaAttribution,
ContractTierAttribution, AmortizationComputation,
GastosForYear, and TierResolution; no function here encodes a
Modelo 100 casilla id or filing-line authority.
Callers outside domain.fincas import only from this module.
Internal modules (_models, _enums, _errors,
_repository_ports, _tier_resolver, _amortization_ledger,
_expense_rollup, and _aggregates) are implementation details.
The concrete ORM-backed repositories that satisfy the reader ports
declared here live in the persistence adapter
(adapters.persistence.profile.fincas), not in this domain
package — keeping the SQLAlchemy / mapper-row coupling out of the
domain layer.
Art. 85 imputation rates and the catastral-revision window enter through the
registry legal-parameter catalogue before the aggregate functions run. The
aggregate records are factual source material for registry-backed Modelo 100
bindings; domain.calculations.registry.RegistrySnapshot and
domain.calculations.registry.CasillaObservation remain the filing
line and provenance authorities.
See also
adapters.persistence.profile.fincasConcrete SQLAlchemy repositories implementing the reader ports exported by this domain facade.
domain.calculations.registryRegistry authority that turns finca-derived factual inputs into typed modelo casilla observations.
domain.manualsBundled manual corpus that grounds the same LIRPF rental concepts without storing operator finca records.
Submodules¶
- aeat.domain.fincas._aggregates module
- aeat.domain.fincas._amortization_ledger module
- aeat.domain.fincas._enums module
UseTypeExpenseCategoryExpenseCategory.FINANCIACION_INTERESESExpenseCategory.CONSERVACION_REPARACIONExpenseCategory.IBI_TRIBUTOS_NO_ESTATALESExpenseCategory.COMUNIDADExpenseCategory.SEGUROSExpenseCategory.SUMINISTROSExpenseCategory.ADMINISTRACION_PORTERIA_VIGILANCIAExpenseCategory.FORMALIZACION_CONTRATOExpenseCategory.DEFENSA_JURIDICAExpenseCategory.SALDOS_DUDOSO_COBROExpenseCategory.OTROS
ReduccionTier
- aeat.domain.fincas._errors module
- aeat.domain.fincas._expense_rollup module
CARRY_FORWARD_MAX_YEARSCAPPED_CATEGORIESCarryForwardEntryGastosForYearGastosForYear.period_yearGastosForYear.ingresos_for_periodGastosForYear.por_categoriaGastosForYear.capped_categories_subtotalGastosForYear.capped_categories_appliedGastosForYear.capped_categories_excessGastosForYear.carry_consumedGastosForYear.carry_forward_afterGastosForYear.total_deductible
compute_gastos_for_year()
- aeat.domain.fincas._imputacion_parameters module
- aeat.domain.fincas._models module
FincaFinca.idFinca.identifierFinca.addressFinca.valor_catastral_totalFinca.valor_catastral_construccionFinca.valor_catastral_revision_yearFinca.coste_adquisicionFinca.coste_adquisicion_construccionFinca.acquisition_dateFinca.disposal_dateFinca.use_typeFinca.is_stressed_areaFinca.schema_versionFinca.imputed_under_art_85
ArrendamientoArrendamiento.idArrendamiento.finca_idArrendamiento.contract_celebration_dateArrendamiento.contract_termination_dateArrendamiento.tenant_countArrendamiento.qualifying_co_tenant_countArrendamiento.tenant_min_ageArrendamiento.tenant_max_ageArrendamiento.tenant_is_public_adminArrendamiento.tenant_is_ley_49_2002_entity_with_social_useArrendamiento.tenant_is_imv_beneficiaryArrendamiento.dwelling_in_public_programArrendamiento.prior_contract_last_rentArrendamiento.prior_contract_indexationArrendamiento.initial_rentArrendamiento.is_first_rentalArrendamiento.rehabilitation_finished_dateArrendamiento.lau_17_6_compliantArrendamiento.schema_version
FincaRendimientoRecordFincaGastoFincaAmortizacionLedgerEntryFincaAmortizacionLedgerEntry.idFincaAmortizacionLedgerEntry.finca_idFincaAmortizacionLedgerEntry.period_yearFincaAmortizacionLedgerEntry.dias_alquiladosFincaAmortizacionLedgerEntry.basis_usedFincaAmortizacionLedgerEntry.amortization_amountFincaAmortizacionLedgerEntry.cumulative_amortization_through_yearFincaAmortizacionLedgerEntry.schema_version
- aeat.domain.fincas._repository_ports module
- aeat.domain.fincas._source_readiness module
- aeat.domain.fincas._tier_resolver module