cadrumo.domain.calculations.registry.m303_differentiated_deduction_projection module

Ephemeral M303 differentiated-sector deduction row projection.

class IvaDifferentiatedDeductionContributionProtocol(*args, **kwargs)[source]

Bases: Protocol

sector_id: str
deduction_fact_kind: IvaDeductionFactKind
source_ledger_ids: tuple[str, ...]
base_amount: Decimal
deducible_iva_amount: Decimal
class M303DifferentiatedDeductionEndpointValue(**data)[source]

Bases: BaseModel

One projected endpoint value for a differentiated-sector deduction row.

Parameters:

data (Any)

projection_ref: M303DifferentiatedDeductionProjectionRef
value: Decimal
class M303DifferentiatedDeductionRowProjection(**data)[source]

Bases: BaseModel

A differentiated-sector prorrata deduction row projected across its 18 endpoints.

Parameters:

data (Any)

slot: int
sector_id: str
regime: ProrrataRegisterRegime
percentage: Decimal
endpoints: tuple[M303DifferentiatedDeductionEndpointValue, ...]
project_m303_differentiated_deduction_rows(*, projection_refs, register, ejercicio, contributions, regularisation_result=None)[source]

Project the two canonical sector rows, refusing every incomplete authority.

Return type:

tuple[M303DifferentiatedDeductionRowProjection, ...]

Parameters: