cadrumo.domain.renta package

Inert namespace for the Renta (IRPF / Modelo 100) substrate.

This package owns the first-slice Modelo 100 ledger-expense observation surface and the maritime worker exemption selectors used by application calculation previews.

The first-slice expense path evaluates RentaDeductibleExpenseFact values with RentaDeductibilityContext and category-profile evidence into RentaDeductibilityResult values, then materialises binding-ready RentaDeductibleExpenseObservation records through evaluate_renta_deductibility() and build_renta_deductible_expense_observation(). The context carries resolved usage-ratio, statutory-cap, and exclusive-use facts; profile proportionality rules and citations remain in domain.categories, while persisted operator overrides remain in domain.usage_ratios. The dated first-slice routing resolver is the single Renta-domain projection from domain.categories.spending_category.SpendingCategory to registry casilla ids for the supported first slice; the registry validates those targets through a cross-domain snapshot check installed by the registry snapshot builder. The M130 retenciones-a-cuenta route is selected from governed registry data and validated by the same cross-domain mechanism.

The maritime surface exposes MaritimeWorkerFacts, Art. 7.p and REBECA eligibility/calculation helpers, the inactive DA 41 guard, and the RETMAR mandatory-filing completeness gate. Exemption calculations resolve their target from registry authority and return domain.calculations.registry.bindings.CasillaObservation records with legal and source provenance. This domain surface is pure substrate logic: repositories, active-profile reads, CLI transport, and live AEAT access belong outside domain.renta.

Consumers import each contract from its defining module. The package initializer exports no symbols and performs no registration side effects.

See also

domain.categories

Declares the spending-category taxonomy, proportionality rules, and legal citations that drive Renta deductibility decisions.

domain.usage_ratios

Persists operator business-use ratios before application aggregation passes them into RentaDeductibilityContext.

application.aggregation

Loads active ledger and invoice evidence, builds Renta observations, and returns registry-ready source resolutions.

domain.calculations.registry

Owns binding declarations, casilla formulas, and the snapshot check contract that validates this domain’s first-slice and retenciones routing facts.

Submodules