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.LedgerFilingEvidence

Bundled fact basis attached to a ledger-derived calculation revision.

SheetEvidenceFacet

Workbook-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.

LedgerFilingEvidence is 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 canonical CasillaId values it supports. Missing attribution raises CalcSheetsEngineError instead of being guessed from modelo-specific tax facts.

Returns:

The projected evidence facet.

Return type:

SheetEvidenceFacet

Parameters: