aeat.domain.calculations.registry._retenciones_bindings module

Retenciones-aggregation registry binding helpers (RET-1).

The per-family module for the retenciones_aggregation binding source — the calc-mesh source that materialises retenciones-family scalars from the dedicated per-perceptor retención store. Extracted as its own family module per registry-resolver-family-extraction; the cross-family validator dispatch in _bindings registers this family’s validate(binding) -> list[str] entry.

The materialisation depends on a _RetencionesAggregationProtocol rather than the application-layer RetencionesAggregation, so the domain layer stays independent of the application aggregation service.

The resolver walks the declared ModeloRevision bindings and emits only canonical binding values for this source family.

validate_retenciones_aggregation_binding(binding)[source]

Accumulating registry-build validator for a retenciones_aggregation binding.

Validates the selector shape against _RetencionesAggregationSelector (the single build-time contract per binding-validation-single-contract), preserving the underlying pydantic field message in the diagnostic.

Return type:

list[str]

Parameters:

binding (DataBindingDefinition)

resolve_retenciones_aggregation_binding_values(revision, aggregation)[source]

Materialise every retenciones_aggregation binding on a ModeloRevision.

Returns a binding value for every binding whose source is BindingSourceKind.RETENCIONES_AGGREGATION, keyed by the selector’s declared fact.

Return type:

dict[TypeAliasType, Decimal]

Parameters:
  • revision (ModeloRevision)

  • aggregation (_RetencionesAggregationProtocol)