cadrumo.domain.calculations.registry.schema_rounding module¶
Rounding-code schema axis for registry formulas.
- class RegistryRoundingCode(*values)[source]¶
Bases:
StrEnumClosed rounding-code vocabulary for formula results.
Each member names one rounding MODE; the mode is never inferred from the target’s data type, because two formulas producing the same data type can be bound by different legal rounding rules.
MONEY_2— two decimals, half-up, per the AEAT Instrucciones (core.money.rounding.round_to_cents()).INTEGER— whole units, half-up. The neutral integer mode for a target the law does not direct a specific way (e.g. a count of perceptores).INTEGER_CEILING— whole units, always toward the next unit up (ROUND_CEILING), never half-up. Required wherever the governing provision says the result is taken to the unidad superior: LIVA art. 104.Dos closes its prorrata-general apartado with “La prorrata de deducción resultante de la aplicación de los criterios anteriores se redondeará en la unidad superior”, so a 55,2 % ratio is a 56 % deduction right, not 55 %. Half-up would understate the deduction for every ratio whose fractional part is at or below one half.
- MONEY_2¶
- INTEGER¶
- INTEGER_CEILING¶