cadrumo.application.overview.status_report module¶
The overview status report and the advisories it carries.
These four builders were defined directly in the package namespace, which is why that namespace could not be made inert by deleting an export map: there was production code in it. They live in a module of their own now, and the package root re-exports nothing.
- 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.models.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.modelo.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.schema.ModeloDraftcount and theWorkUnitCataloguecount 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(*, certificate_secret_backend_factory, operator_probe_ports, operator_scope_ports, read_ports, operation, 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:
certificate_secret_backend_factory (CertificateSecretBackendFactory)
operator_probe_ports (OperatorProbePorts)
operator_scope_ports (OperatorScopePorts)
read_ports (StateProjectionReadPorts)
operation (PinnedAuthorityOperation)
state (WorkflowState | None)