cadrumo.domain.iva.deduction_facts module

Immutable, evidence-grounded IVA deduction-fact classification.

class IvaDeductionClassificationProvenance(**data)[source]

Bases: BaseModel

Immutable evidence pointer for one explicitly classified deduction fact.

Parameters:

data (Any)

authority: IvaDeductionEvidenceAuthority
source_locator: str
evidence_digest: ContentDigest
required_deduction_evidence_authority(kind)[source]

Return the one evidence authority that can establish kind.

Exposes the mapping validate_iva_deduction_fact() already enforces, so a caller deciding whether it is ABLE to build a provenance for a kind reads the same table the refusal is derived from. Without this a caller must either duplicate the mapping or attempt a construction it knows will be rejected, and a duplicate would be free to drift.

Return type:

IvaDeductionEvidenceAuthority

Parameters:

kind (IvaDeductionFactKind)

validate_iva_deduction_fact(*, kind, provenance, category, rate_kind, flow_direction, base_amount, iva_amount, investment_asset_id, rectifies_ledger_id)[source]

Refuse every deduction classification combination lacking legal authority.

Return type:

None

Parameters: