aeat.application.modelo._m303_m349_reconcile module¶
Modelo 303 <-> Modelo 349 intra-community reconcile advisory.
An operator who carries out intra-community operations files both the periodic
Modelo 303 self-assessment — whose information boxes 10 (adquisiciones
intracomunitarias de bienes y servicios) and 59 (entregas intracomunitarias
de bienes y servicios) total the period’s intra-community activity — and the
recapitulativa Modelo 349, whose resumen box decl.importe-operaciones
(Importe de las operaciones intracomunitarias) totals every intra-community
operation declared per counterparty. The two totals describe the same economic
activity for the same period and must reconcile; a material divergence is an
operator error to resolve before filing (a missing or duplicated operator row on
the 349, a mis-booked intra-community invoice on the 303).
This module surfaces that divergence as a non-blocking WARNING advisory on the
verify path (a ModeloVerificationFinding of kind
reconciliation_mismatch). It is deliberately advisory rather than blocking:
legitimate scope/timing differences (triangular operations, rectifications
carried in a separate 349 resumen field, cadence quirks) can produce small,
explainable gaps, so only a gap beyond a de-minimis euro tolerance is reported,
and it never refuses the verified-complete transition. Both aggregations already
exist — this cross-validator only reads the two persisted totals; it does not
re-derive either one.
- m303_m349_intracom_reconcile_findings(*, work_unit, target, work_unit_repository, calculation_repository)[source]¶
Reconcile Modelo 303 intra-community totals against the Modelo 349 resumen.
When the work unit under verification is a Modelo 303 or Modelo 349 and its same-bucket, same-period counterpart carries a persisted calculation revision, compares the 303 intra-community total (box 10 + box 59) against the 349 resumen total (
decl.importe-operaciones). A gap beyond_M303_M349_RECONCILE_DEMINIMIS_EURyields one non-blocking WARNINGModeloVerificationFinding; otherwise the list is empty. The reconcile is skipped (empty list) when the modelo is neither 303 nor 349, the counterpart work unit or its revision is absent, or both totals are zero (nothing intra-community declared on either side).- Parameters:
work_unit (
WorkUnit) – The work unit being verified (the reconcile anchor).target (
CalculationRevision) – The draftCalculationRevisionunder verification, supplying the anchor modelo’s own totals.work_unit_repository (
WorkUnitCatalogueRepositoryProtocol) – Source of the counterpart work unit.calculation_repository (
CalculationRevisionCatalogueRepositoryProtocol) – Source of the counterpart’s persisted revision.
- Return type:
- Returns:
Zero or one WARNING-severity advisory finding.