cadrumo.domain.calculations.registry.ledger_renta_gastos_pago_fraccionado_bindings module¶
Canonical M130 pago-fraccionado ledger-gastos binding family.
- class RentaGastosPagoFraccionadoObservationProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolStructural protocol for M130 pago-fraccionado gastos observations.
The registry only needs these two attributes to resolve
ledger_renta_gastos_pago_fraccionado_aggregationbindings; the fullRentaGastoObservationsatisfies this protocol without any explicit declaration. MirrorsRentaIncomeObservationProtocolfor the gastos dimension.
- validate_ledger_renta_gastos_pago_fraccionado_aggregation_binding_definition(binding)[source]¶
Validate a
ledger_renta_gastos_pago_fraccionado_aggregationbinding definition.- Return type:
- Parameters:
binding (BindingDefinition)
- resolve_ledger_renta_gastos_pago_fraccionado_aggregation_binding_values(revision, observations)[source]¶
Resolve every
ledger_renta_gastos_pago_fraccionado_aggregationbinding onrevision.Matches observations by
target_casilla_idand sums theirdeductible_amount, mirroring the income resolver’s casilla-keyed fold. Delegates the filter/aggregate skeleton toresolve_ledger_family_binding_values(), shared by every ledger family resolver.- Parameters:
revision (
ModeloRevision) – TheModeloRevisionwhose gasto bindings are resolved.observations (
Iterable[RentaGastosPagoFraccionadoObservationProtocol]) – M130 deductible gastos observations to aggregate over.
- Return type:
- unsupported_ledger_renta_gastos_pago_fraccionado_observations(revision, observations)[source]¶
Return the gasto observations no
ledger_renta_gastos_pago_fraccionado_aggregationbinding can consume.revisionis theModeloRevisionwhose declared bindings define what is consumable.Delegates the screen to
unsupported_ledger_family_observations()— see that function for the shared fail-closed contract (why an unmatched observation is a modelling gap, not a legitimate zero). This family’s own contribution is narrow: thetarget_casilla_idmatch predicate (reused from the resolver’s_renta_gastos_pago_fraccionado_build_matcher) and a zero-deductible_amountfalse-fire guard — a gasto that contributes nothing declarable is excluded whether or not it is routed. Noextra_exclusion; unlike the IVA family this family has no category-level carve-out.- Return type:
- Returns:
Unsupported
RentaGastosPagoFraccionadoObservationProtocolobservations.- Parameters:
revision (ModeloRevision)
observations (Iterable[RentaGastosPagoFraccionadoObservationProtocol])
- validate_ledger_renta_gastos_pago_fraccionado_aggregation_binding(binding)[source]¶
Validate a
ledger_renta_gastos_pago_fraccionado_aggregationbinding at registry-build time.Accumulating
list[str]validator overLedgerRentaGastosPagoFraccionadoProvider; runs the casilla / fact / aggregation-op invariant at build time throughinvariant_diagnostics(), whose raise-style body isvalidate_ledger_renta_gastos_pago_fraccionado_aggregation_binding_definition().- Return type:
- Parameters:
binding (BindingDefinition)
- class LedgerRentaGastosPagoFraccionadoProvider(**data)[source]¶
Bases:
BaseModelValidated form of a ledger_renta_gastos_pago_fraccionado_aggregation binding selector.
modelois fixed to the M130 series (the only model sourcing gastos via this cumulative path).target_casilla_idis casilla 02 (“Gastos”). No period axis: the cumulative year-to-date window is applied by the application aggregator, exactly as for the income sibling.- Parameters:
data (Any)
- kind: Literal[BindingSourceKind.LEDGER_RENTA_GASTOS_PAGO_FRACCIONADO_AGGREGATION]¶
- modelo: Modelo¶
- target_casilla_id: CasillaId¶
- fact: Literal['deductible_amount_sum']¶