cadrumo.domain.calculations.registry.ledger_binding_selector_support module

Shared selector primitives for ledger aggregation binding families.

mapping_lacks_fact(value)[source]

Whether value is a mapping with no fact key.

Return type:

bool

Parameters:

value (object)

casilla_id_set(surface, *values)[source]

Validate a closed family of registry casilla identifiers.

Return type:

frozenset[TypeAliasType]

Parameters:
class LedgerIncomeFact(*values)[source]

Bases: StrEnum

A figure a ledger-income binding can total out of matched rows.

INGRESOS_INTEGROS_SUM
CASH_RECEIVED_SUM
TAXABLE_BASE_SUM
WITHHELD_AMOUNT_SUM
LedgerIncomeFactValue

Every income fact, for a selector that can total any of them.

alias of Literal[INGRESOS_INTEGROS_SUM, CASH_RECEIVED_SUM, TAXABLE_BASE_SUM, WITHHELD_AMOUNT_SUM]

ImpatriadoLedgerIncomeFact

The income facts the impatriado regime’s bindings actually total.

A genuine narrowing, not a separate vocabulary: the two tokens mean exactly what they mean for renta income, and the impatriado selector simply has no binding that needs a taxable base or a withheld amount. Rooted here rather than spelled out in its own module, where the pair looked unrelated to the four it is drawn from.

alias of Literal[INGRESOS_INTEGROS_SUM, CASH_RECEIVED_SUM]

class LedgerIvaFact(*values)[source]

Bases: StrEnum

A figure an IVA ledger binding can total out of matched rows.

IVA_AMOUNT_SUM
BASE_AMOUNT_SUM
RECARGO_AMOUNT_SUM
LedgerIvaFactValue

Every IVA fact, for a selector that can total any of them.

alias of Literal[IVA_AMOUNT_SUM, BASE_AMOUNT_SUM, RECARGO_AMOUNT_SUM]

OssIossLedgerFact

The IVA facts an OSS/IOSS binding totals.

Narrower because recargo de equivalencia does not arise in the one-stop-shop regimes, so a recargo total is not merely unused there – it is not a thing that exists.

alias of Literal[IVA_AMOUNT_SUM, BASE_AMOUNT_SUM]