aeat.application.overview package¶
Application read models for aeat app overview.
The package owns the typed DTOs and pure builders behind the overview
status, calendar, agenda, backlog, and explain
surfaces. CLI adapters supply the active profile or bucket state,
already-persisted live-read snapshots, local filing records, and query dates;
these builders do not contact AEAT and do not mutate storage.
overview status delegates to
application.state_projection.build_operator_state_projection()
and projects the canonical
application.state_projection.OperatorStateProjection through
overview_status_report_from_projection() into
OverviewStatusReport. overview calendar composes the existing
domain.deadlines.DeadlineEngine over the requested year
window, returning OverviewCalendarEntry obligation rows, additive
OverviewCalendarEvent observations, and
OverviewCalendarFilingEvidence rows.
Calendar evidence deliberately keeps OverviewLocalFilingState
separate from OverviewAeatSubmissionState: a local ready/filed
record never implies an AEAT submission, and an observed AEAT submission
is not a verified justificante until persisted receipt metadata proves
the CSV/model/year/period/taxpayer match. Raw profile values may also
produce typed CalendarWarning and CalendarCompleteness
records through build_filing_obligation_advisories() so
deadline-engine defaults are visible rather than silent.
See also
application.state_projectionCanonical producer for the
application.state_projection.OperatorStateProjectionconsumed byoverview status.domain.deadlinesDeadline engine and
domain.deadlines.Scheduleauthority used by calendar, agenda, backlog, and explain read models.application.liveRead-only capture surface that persists the live evidence this package can display without opening AEAT again.
domain.modelosLocal
domain.modelos.ModeloRecordanddomain.modelos.ExternalEvidencerecords projected into overview calendar evidence.application.workflowActive-profile and pending-obligation state that remains upstream of overview rendering.
- build_filing_obligation_advisories(raw_values, *, filing_year=None)[source]¶
Derive overview-status advisory locale keys from raw profile values.
The helper feeds
OverviewStatusReportand stays on the local read-model path. It implements the Art. 96.2.a)/96.3 LIRPF multiple-pagadores rule throughdomain.deadlines.evaluate_multiple_pagadores_obligation(): when the operator has declaredirpf.pagadores_count >= 2andirpf.pagadores_secondary_income > 1500, the work-income exemption limit drops from the general €22,000 to the per-year reduced limit, and Modelo 100 filing is mandatory whenirpf.pagadores_total_work_incomeexceeds that reduced limit. When the total work income is undeclared, the advisory surfaces conservatively rather than granting a false clear.- Parameters:
- Return type:
Returns a tuple of
tr()-resolvable locale keys, empty when no evidence of a mandatory obligation is present. Malformed raw values are logged only by profile-field name and exception type.
- build_unsupported_work_create_modelos(raw_values)[source]¶
Return modelos whose local work-create path is unsupported.
The result feeds
OverviewStatusReportand uses canonicalcore.Modeloidentifiers. Non-resident IRNR profile state currently advertises Modelo 210 because the local work-create path is not available for that filing.
- overview_status_report_from_projection(projection, *, raw_values=None)[source]¶
Project the canonical state projection into the
overview statusemit shape.The
OverviewStatusReportis a CLI emit shape derived from the oneapplication.state_projection.OperatorStateProjection; it is not a second state-assembly path. Both the declaration-draftdomain.filing.ModeloDraftcount and thedomain.modelos.WorkUnitCataloguecount are carried distinctly.- Parameters:
projection (
OperatorStateProjection) – The canonical state projection to project.raw_values (
Mapping[str,object] |None) – Optional profile raw values mapping. When supplied, used to evaluate filing-obligation advisories (e.g., the Art. 96.3 LIRPF multiple-pagadores rule).
- Return type:
- Returns:
An
OverviewStatusReportderived from the projection.
- build_overview_status_report(*, state=None, raw_values=None)[source]¶
Build and return the
OverviewStatusReportused by root and overview status.Consumes the canonical
application.state_projection.build_operator_state_projection()and projects it throughoverview_status_report_from_projection(); the bespoke per-surface store assembly this function once carried is deleted.overview statustherefore reports the same counters as every other operator surface — including themodelo workwork units the old assembly never read.- Return type:
- Parameters:
state (WorkflowState | None)
Submodules¶
- aeat.application.overview._agenda module
OverviewAgendaOverviewAgenda.as_ofOverviewAgenda.horizon_daysOverviewAgenda.next_dueOverviewAgenda.due_todayOverviewAgenda.due_soonOverviewAgenda.overdueOverviewAgenda.generated_atOverviewAgenda.warningsOverviewAgenda.completenessOverviewAgenda.coverageOverviewAgenda.taxpayer_model_declaredOverviewAgenda.incomplete_reason
build_overview_agenda()
- aeat.application.overview._backlog module
- aeat.application.overview._calendar module
- aeat.application.overview._calendar_evidence module
- aeat.application.overview._calendar_models module
OverviewPeriodStateOverviewCensoEnrolmentStateOverviewCalendarEntrySourceOverviewLocalFilingStateOverviewAeatSubmissionStateuser_state_for()OverviewCalendarRangeOverviewCalendarFilingEvidenceOverviewCalendarFilingEvidence.modeloOverviewCalendarFilingEvidence.filing_yearOverviewCalendarFilingEvidence.periodOverviewCalendarFilingEvidence.local_filing_stateOverviewCalendarFilingEvidence.local_filing_record_idOverviewCalendarFilingEvidence.local_calculation_revision_idOverviewCalendarFilingEvidence.local_filed_atOverviewCalendarFilingEvidence.aeat_submission_stateOverviewCalendarFilingEvidence.aeat_submitted_atOverviewCalendarFilingEvidence.aeat_reference_idOverviewCalendarFilingEvidence.aeat_snapshot_idOverviewCalendarFilingEvidence.aeat_evidence_kindOverviewCalendarFilingEvidence.aeat_evidence_conflict_reference_idsOverviewCalendarFilingEvidence.verified_justificante_csvOverviewCalendarFilingEvidence.justificante_requiredOverviewCalendarFilingEvidence.justificante_verifiedOverviewCalendarFilingEvidence.evidence_source
OverviewCalendarEntryOverviewCalendarEntry.modeloOverviewCalendarEntry.periodOverviewCalendarEntry.opens_onOverviewCalendarEntry.closes_onOverviewCalendarEntry.adjusted_closes_onOverviewCalendarEntry.shift_reasonOverviewCalendarEntry.holiday_refsOverviewCalendarEntry.jurisdictionsOverviewCalendarEntry.payment_cutoff_onOverviewCalendarEntry.statusOverviewCalendarEntry.user_stateOverviewCalendarEntry.recoveryOverviewCalendarEntry.filing_yearOverviewCalendarEntry.censo_enrolment_stateOverviewCalendarEntry.filing_evidenceOverviewCalendarEntry.sourceOverviewCalendarEntry.local_work_unit_idOverviewCalendarEntry.local_work_unit_nameOverviewCalendarEntry.local_work_unit_revision_id
OverviewCalendarEventTypeOverviewCalendarEventOverviewCalendarEvent.event_typeOverviewCalendarEvent.post_filing_kindOverviewCalendarEvent.event_dateOverviewCalendarEvent.sourceOverviewCalendarEvent.summaryOverviewCalendarEvent.reference_idOverviewCalendarEvent.snapshot_idOverviewCalendarEvent.modeloOverviewCalendarEvent.filing_yearOverviewCalendarEvent.periodOverviewCalendarEvent.statusOverviewCalendarEvent.source_urlOverviewCalendarEvent.authenticated_identityOverviewCalendarEvent.aeat_submission_stateOverviewCalendarEvent.aeat_submitted_atOverviewCalendarEvent.justificante_verifiedOverviewCalendarEvent.verified_justificante_csv
CalendarWarningCalendarCompletenessSuppressedCalendarEntryOverviewCalendarOverviewStatusReportOverviewStatusReport.active_profileOverviewStatusReport.active_profile_nameOverviewStatusReport.transactionsOverviewStatusReport.invoicesOverviewStatusReport.draftsOverviewStatusReport.work_unitsOverviewStatusReport.discarded_work_unitsOverviewStatusReport.calculation_revisionsOverviewStatusReport.unreadable_rowsOverviewStatusReport.filing_obligation_advisoriesOverviewStatusReport.unsupported_work_create_modelos
- aeat.application.overview._calendar_warnings module
- aeat.application.overview._coverage module
- aeat.application.overview._data_prep module
- aeat.application.overview._errors module
- aeat.application.overview._explain module
- aeat.application.overview._pipeline_health module