aeat.application.modelo._minimo_descendientes_advisory module

Calculate-path advisory for an undeclared Art. 58/61 mínimo por descendientes.

Modelo 100 casillas irpf_minimo_descendientes_estatal (0513) and irpf_minimo_descendientes_autonomico (0514) are input_kind = computed: the Art. 58/61 LIRPF aggregate is derived from the active profile’s renta_family.descendiente.{n}.* facts by inject_derived_minimo_descendientes_facts(). A profile that carries no descendiente facts at all resolves 0513/0514 to the legally-correct zero for a genuinely childless filer — but the SAME zero also results when a filer with real descendants simply never declared them (no live production surface wrote renta_family.descendiente.* before aeat config profile descendiente add was introduced). The two cases are indistinguishable from the computed value alone, so this collector raises a non-blocking advisory whenever 0513 resolves to zero AND the profile has NOT explicitly declared its descendientes situation, pointing the operator at the entry command (no-silent-under-declaration). “Explicitly declared” covers both a per-descendant renta_family.descendiente.{n}.* fact (the config profile descendiente add entry surface) and a bare renta_family.descendientes_count fact (even 0) written by another surface — a persona that positively declares zero children is not a silent gap, whether or not any declared descendant turns out Art. 58.1-eligible.

See also

_calculation_diagnostics:

Post-calculation coordinator that calls this collector with the engine casilla values and the owning bucket id.

inject_derived_minimo_descendientes_facts():

Computes the Art. 58/61 aggregate this collector’s zero-check inspects.

parse_descendiente_flag():

Parses the --descendiente flag the advisory’s next_action names.

collect_minimo_descendientes_undeclared_diagnostics(revision, casilla_values, *, modelo, bucket_id)[source]

Return an advisory when 0513 resolved to zero with no descendientes declared.

Parameters:
  • revision (ModeloRevision) – The ModeloRevision being calculated. Only Modelo 100 revisions declare the mínimo por descendientes semantic role; every other modelo returns an empty tuple immediately.

  • casilla_values (Mapping[TypeAliasType, Decimal]) – The computed engine values keyed by CasillaId.

  • modelo (str) – The modelo identifier of the filing being calculated.

  • bucket_id (str) – Bucket identifier used to load the active profile’s descendientes facts.

Return type:

tuple[CalculationSourceDiagnostic, ...]

Returns:

A one-element tuple carrying the advisory, or an empty tuple when 0513 is nonzero or the profile already declares at least one descendiente fact.

Returns:

A CalculationSourceDiagnostic.