aeat.domain.calculations.registry._binding_aggregation module

Single accessor for a registry binding’s aggregation operator.

The per-family default op was previously re-parsed at ~10 call sites with two divergent silent defaults: the detail-record families defaulted to rows while every scalar-folding family defaulted to sum. This module centralises that divergence into one declared mapping from binding source kind to the default BindingAggregationOp, exposed through the single binding_aggregation_op() accessor every binding resolver and validator consumes.

See also

domain.calculations.registry._bindings

Cross-family binding resolver and validator dispatch that consumes this accessor.

domain.calculations.registry._relation_aggregation

Relation sibling whose op axis is intentionally separate.

core.aggregation

Core enum/model definitions for binding source kinds and aggregation ops.

default_binding_aggregation_op(source)[source]

Return the per-family default BindingAggregationOp for a source.

Detail-record families (related-party, foreign-asset, atribución, refund) default to ROWS; every other source family defaults to SUM. The source value is interpreted through BindingSourceKind before applying the row-set default table.

Return type:

BindingAggregationOp

Parameters:

source (str)

binding_aggregation_op(binding)[source]

Return the typed BindingAggregationOp a binding declares, or its default.

When the DataBindingDefinition carries an explicit BindingAggregation, its typed op is returned. When aggregation is None, the declared per-family default for the binding’s source is applied in this one place.

Return type:

BindingAggregationOp

Parameters:

binding (DataBindingDefinition)