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._bindingsCross-family binding resolver and validator dispatch that consumes this accessor.
domain.calculations.registry._relation_aggregationRelation sibling whose op axis is intentionally separate.
core.aggregationCore enum/model definitions for binding source kinds and aggregation ops.
- default_binding_aggregation_op(source)[source]¶
Return the per-family default
BindingAggregationOpfor asource.Detail-record families (related-party, foreign-asset, atribución, refund) default to
ROWS; every other source family defaults toSUM. Thesourcevalue is interpreted throughBindingSourceKindbefore applying the row-set default table.- Return type:
- Parameters:
source (str)
- binding_aggregation_op(binding)[source]¶
Return the typed
BindingAggregationOpa binding declares, or its default.When the
DataBindingDefinitioncarries an explicitBindingAggregation, its typedopis returned. WhenaggregationisNone, the declared per-family default for the binding’ssourceis applied in this one place.- Return type:
- Parameters:
binding (DataBindingDefinition)