aeat.application.calculations._iva_wallet_balance module¶
Repository-backed IVA compensation wallet balance query.
Loads stored Modelo 303 compensation period states and projects them into the
pure
IvaWalletBalanceReport summary
owned by the IVA-compensation domain. The summary projection and its record are
exposed from domain.iva_compensation; this module is the application
orchestration that wires
IvaCompensationHistoryRepository
to that pure projection.
See also
build_iva_compensation_carry_forward_report()Builds the FIFO lot projection from stored period states.
build_iva_wallet_balance_report()Collapses the carry-forward lots into the operator-facing balance snapshot.
- query_iva_wallet_balance(*, as_of_year)[source]¶
Load all stored IVA compensation period states and return the balance report.
Reads
IvaCompensationPeriodStaterows fromIvaCompensationHistoryRepository, builds aIvaCompensationCarryForwardReport, and returns anIvaWalletBalanceReportsummarising available compensation as ofas_of_year.- Return type:
- Parameters:
as_of_year (int)