aeat.application.modelo._art109_activity_income module¶
Period-scoped Art. 109 activity-income coverage from ledger evidence.
The coverage helper derives the RIRPF Art. 109 70 percent withholding fact from
current-period ledger rows in a
TransactionCatalogue. Work-unit consumers use
a bucket-scoped TransactionCatalogueRepository
to load that catalogue before applying the same pure calculation.
The result is intentionally evidence-scoped: the denominator and withholding status must be proven from invoice-substrate ledger facts, so gross-only bank movements fail closed instead of fabricating an activity-income ratio.
See also
derive_art109_activity_income_coverage()Pure catalogue-level derivation for already-loaded ledger rows.
derive_art109_activity_income_coverage_for_work_unit()Work-unit adapter that resolves the matching bucket repository.
application.modelo._verification_actionsVerification path that folds a proven coverage fact into the workflow profile used for M130 verification.
- class Art109ActivityIncomeCoverageStatus(*values)[source]¶
Bases:
StrEnumWhether current-period ledger evidence proves the Art. 109 threshold.
- PROVEN¶
- INSUFFICIENT¶
- class Art109ActivityIncomeCoverage(status, meets_threshold, numerator, denominator, reason)[source]¶
Bases:
objectPeriod-scoped Art. 109 70 percent activity-income coverage result.
- Parameters:
status (Art109ActivityIncomeCoverageStatus)
meets_threshold (bool | None)
numerator (Decimal)
denominator (Decimal)
reason (str)
- derive_art109_activity_income_coverage_for_work_unit(work_unit, *, transaction_repository)[source]¶
Derive the Art. 109 current-payment-period coverage fact for an M130 work unit.
The returned
Art109ActivityIncomeCoverageis proven only from current-period ledger rows, not from M130 output casillas. A row proves the denominator and withholding status only when it carries invoice substrate (taxable_baseandiva_amount); gross-only bank movements fail closed because they cannot prove whether the receipt was subject to withholding.- Return type:
- Parameters:
work_unit (WorkUnit)
transaction_repository (TransactionCatalogueRepositoryProtocol | None)
- derive_art109_activity_income_coverage(catalogue, *, period)[source]¶
Derive Art. 109 current-period coverage from a transaction catalogue.
- Parameters:
catalogue (
TransactionCatalogue) –TransactionCataloguecontaining the ledger rows to classify for the target period.period (
Period) – Filing period whose date span selects the current-payment rows.
- Return type:
- Returns:
The proven or insufficient
Art109ActivityIncomeCoverage.