aeat.domain.iva_compensation package

Public facade for pure IVA-compensation domain primitives.

This package owns the regulatory Modelo 303 carry-forward projection, the Modelo 390 year-end carry partition, the wallet reconciliation decision logic, and the wallet balance projection. The domain works with typed immutable records such as IvaCompensationPeriodState, IvaCompensationCarryForwardLot, IvaCompensationCarryForwardReport, IvaCompensationYearEndCarryPartition, and IvaWalletBalanceReport; it does not open repositories, emit bucket events, or resolve the active profile.

Compensation availability is derived by derive_303_compensation_available() and then projected through build_iva_compensation_carry_forward_report() / enforce_iva_compensation_four_year_window(). Reconciliation records such as IvaCompensationOverride, IvaCompensationAuthoritySource, and IvaCompensationReconciliationDecision separate AEAT wallet evidence, filed-history evidence, local recurrence, and taxpayer override before Modelo 303 consumes casilla 110. reconcile_iva_compensation_wallet() and validate_wallet_matches_snapshot() apply that reconciliation policy against a live wallet observation conforming to IvaCompensationWalletObservationProtocol.

Repositories, secure-object custody, live wallet acquisition, and bucket event emission remain application responsibilities.

See also

application.calculations.IvaCompensationHistoryRepository

Encrypted local period-state history consumed by carry reconstruction.

application.calculations.IvaWalletDecisionRepository

Persisted wallet-authority decisions selected before Modelo 303 calculation consumes casilla 110.

application.calculations

Application source resolvers for previous-filing carries, IVA wallet decisions, and Modelo 390 annual carry partitioning.

application.live

Read-only AEAT wallet and filed-history capture surface that supplies external evidence without performing live writes.

application.modelo

Work-unit calculation and IVA-wallet gate that apply the persisted authority decision to registry snapshots.

adapters.persistence.profile.buckets.BucketEventHistoryRepository

Bucket audit trail for persisted decisions and capture orchestration, outside this pure domain package.

Submodules