aeat.application.storage.calc_sheets._evidence module¶
Evidence adapters for calc-sheets workbook export plans.
sheet_evidence_from_ledger_filing() projects
LedgerFilingEvidence into a SheetEvidenceFacet made of
SheetEvidenceContributorRow and SheetEvidenceManualEntry
records for the workbook evidence surface.
The adapter is deliberately attribution-driven. Ledger evidence names the
contributing transactions and manual facts; the caller supplies the mapping from
each contributor to the canonical CasillaId values it supports so this
module never guesses modelo-specific tax meaning from row contents.
See also
aeat.domain.modelos._ledger_filing_snapshot.LedgerFilingEvidenceBundled fact basis attached to a ledger-derived calculation revision.
SheetEvidenceFacetWorkbook-plan evidence facet rendered into the Evidencia tab and JSON sidecar.
- sheet_evidence_from_ledger_filing(evidence, *, casilla_ids_by_contributor_id)[source]¶
Project bundled filing evidence into the per-casilla workbook facet.
LedgerFilingEvidenceis contributor-oriented; the workbook evidence surface is casilla-oriented. The caller must therefore provide the generic attribution map from each contributor transaction id to the canonicalCasillaIdvalues it supports. Missing attribution raisesCalcSheetsEngineErrorinstead of being guessed from modelo-specific tax facts.- Returns:
The projected evidence facet.
- Return type:
- Parameters:
evidence (LedgerFilingEvidence)
casilla_ids_by_contributor_id (Mapping[str, Iterable[CasillaId]])