aeat.domain.deadlines package¶
Public facade for registry-backed filing deadline computation.
DeadlineEngine is the project’s first user-visible
“answer-the-user” surface: given an TaxpayerProfile and a
year, it produces a deterministic typed Schedule of every
filing the taxpayer profile is obliged to submit, with concrete
opens / closes dates and a current ObligationStatus. Each
ModeloDeadline may also carry a Recovery payload backed by
the Ley 58/2003 art. 27 RecargoBand table when the obligation is
overdue.
The engine is read-only — it never touches the storage layer, never files anything, and never mutates its inputs.
The facade also exposes the taxpayer-shape enums consumed by registry
applicability predicates (EntityType, LegalEntityForm,
IrpfIncomeCategory, IrpfEstimationRegime,
FiscalResidency) and the BOE-cited holiday shift substrate
(CalendarCCAA, HolidayCalendar, DeadlineShift,
shift_deadline(), MODELOS_WITHOUT_SHIFT). Profile mappings enter
through taxpayer_profile_from_mapping(); local overview and workflow
services consume the resulting Schedule rather than rebuilding deadline
or recovery logic.
See also
domain.calculations.registry.ValidatedRegistryAuthorityRegistry authority that supplies modelo deadline windows and applicability predicates consumed by
DeadlineEngine.compute_obligation_schedule()Single producer used by workflow gates and state projections to avoid divergent pending-obligation calculations.
taxpayer_profile_from_mapping()Profile-value mapper used by application profile projections before calling this domain engine.
application.workflowApplication workflow gate that evaluates deadline obligations before verification and local filing steps.
application.overviewLocal overview read model that merges this schedule with stored filing evidence.
Examples
>>> from datetime import date
>>> from aeat.domain.deadlines import (
... TaxpayerProfile,
... DeadlineEngine,
... IVARegime,
... next_deadline,
... )
>>> profile = TaxpayerProfile(
... tax_id="X1234567L",
... iva_regime=IVARegime.GENERAL,
... has_employees=False,
... pays_rent_with_retencion=True,
... does_intracomunitario=False,
... bienes_extranjero_above_threshold=False,
... )
>>> engine = DeadlineEngine()
>>> schedule = engine.compute(profile, year=2026, today=date(2026, 4, 1))
>>> _ = next_deadline(schedule, today=date(2026, 4, 1))
Submodules¶
- aeat.domain.deadlines._engine module
- aeat.domain.deadlines._errors module
- aeat.domain.deadlines._festivos module
CalendarCCAACalendarCCAA.ANDALUCIACalendarCCAA.ARAGONCalendarCCAA.ASTURIASCalendarCCAA.ILLES_BALEARSCalendarCCAA.CANARIASCalendarCCAA.CANTABRIACalendarCCAA.CASTILLA_LA_MANCHACalendarCCAA.CASTILLA_Y_LEONCalendarCCAA.CATALUNACalendarCCAA.EXTREMADURACalendarCCAA.GALICIACalendarCCAA.LA_RIOJACalendarCCAA.MADRIDCalendarCCAA.MURCIACalendarCCAA.NAVARRACalendarCCAA.PAIS_VASCOCalendarCCAA.VALENCIACalendarCCAA.CEUTACalendarCCAA.MELILLA
HolidayJurisdictionHolidayHolidayCalendarDeadlineShiftMODELOS_WITHOUT_SHIFTload_holiday_calendar()is_business_day()next_business_day()shift_deadline()
- aeat.domain.deadlines._models module
IVARegimeEntityTypeLegalEntityFormIrpfIncomeCategoryIrpfEstimationRegimeIrpfSpecialRegimeObligationStatusModeloEnrollmentRefundAccountModeloIVAProfileModeloIVAProfile.roi_enrolledModeloIVAProfile.oss_enrolledModeloIVAProfile.group_member_enrolledModeloIVAProfile.group_dominant_entity_enrolledModeloIVAProfile.intracommunity_operations_exceed_50000_eurModeloIVAProfile.sii_enrolledModeloIVAProfile.redeme_enrolledModeloIVAProfile.refund_account
CrossPeriodGroupMemberRosteris_ue_eee_country_code()irnr_representante_fiscal_required()TaxpayerProfileTaxpayerProfile.tax_idTaxpayerProfile.entity_typeTaxpayerProfile.legal_entity_formTaxpayerProfile.irpf_income_categoriesTaxpayerProfile.irpf_estimation_regimeTaxpayerProfile.iva_regimeTaxpayerProfile.has_employeesTaxpayerProfile.pays_professionals_with_retencionTaxpayerProfile.professional_income_withholding_ge_70pctTaxpayerProfile.art109_activity_income_withholding_ge_70pctTaxpayerProfile.pays_rent_with_retencionTaxpayerProfile.pays_capital_income_with_retencionTaxpayerProfile.objective_estimation_prior_year_gross_income_eurTaxpayerProfile.objective_estimation_prior_year_invoice_gross_income_eurTaxpayerProfile.objective_estimation_prior_year_agri_livestock_forest_gross_eurTaxpayerProfile.objective_estimation_prior_year_purchases_eurTaxpayerProfile.objective_estimation_modulos_iae_epigraphTaxpayerProfile.objective_estimation_modulos_module_1_unitsTaxpayerProfile.objective_estimation_modulos_module_2_unitsTaxpayerProfile.objective_estimation_modulos_module_3_unitsTaxpayerProfile.objective_estimation_modulos_module_4_unitsTaxpayerProfile.objective_estimation_modulos_module_5_unitsTaxpayerProfile.objective_estimation_modulos_module_6_unitsTaxpayerProfile.objective_estimation_modulos_module_7_unitsTaxpayerProfile.does_intracomunitarioTaxpayerProfile.third_party_transactions_above_347_thresholdTaxpayerProfile.bienes_extranjero_above_thresholdTaxpayerProfile.monedas_virtuales_extranjero_above_thresholdTaxpayerProfile.ivaTaxpayerProfile.cross_period_group_member_rostersTaxpayerProfile.enrollmentTaxpayerProfile.fiscal_address_cadastral_referenceTaxpayerProfile.fiscal_address_is_habitual_viviendaTaxpayerProfile.activity_start_dateTaxpayerProfile.activity_end_dateTaxpayerProfile.incn_prior_12_monthsTaxpayerProfile.new_entity_first_two_profit_periodsTaxpayerProfile.ley_49_2002_special_regime_option_declaredTaxpayerProfile.ley_49_2002_special_regime_option_dateTaxpayerProfile.ley_49_2002_special_regime_renunciation_declaredTaxpayerProfile.ley_49_2002_special_regime_renunciation_dateTaxpayerProfile.tributacion_estado_porcentajeTaxpayerProfile.establecimiento_typeTaxpayerProfile.elected_withholding_pctTaxpayerProfile.vivienda_office_total_m2TaxpayerProfile.vivienda_office_office_m2TaxpayerProfile.iae_epigraphTaxpayerProfile.notesTaxpayerProfile.irpf_special_regimeTaxpayerProfile.special_regime_start_dateTaxpayerProfile.fiscal_residencyTaxpayerProfile.country_of_fiscal_residenceTaxpayerProfile.representante_fiscal_nifTaxpayerProfile.representante_fiscal_nombreTaxpayerProfile.sal_socios_trabajadores_countTaxpayerProfile.sal_reserva_especial_dotadaTaxpayerProfile.sal_capital_socialTaxpayerProfile.irpf_pagadores_countTaxpayerProfile.irpf_pagadores_secondary_incomeTaxpayerProfile.irpf_pagadores_total_work_incomeTaxpayerProfile.days_in_spainTaxpayerProfile.beckham_window_active()TaxpayerProfile.ue_eee_statusTaxpayerProfile.residency_boundary_near
resolve_multiple_pagadores_reduced_limit()evaluate_multiple_pagadores_obligation()RecargoBandRecoveryModeloDeadlineSchedule
- aeat.domain.deadlines._plazo module
- aeat.domain.deadlines._profiles module
- aeat.domain.deadlines._recargo module
- aeat.domain.deadlines.taxpayer_model module