REQ-NFR-070
Cost amounts stored as fixed-precision integer cents, never float
What
Every monetary amount in budget_allocation, cost_baseline_allocation, and cost_ledger SHALL be stored as a signed 64-bit integer representing cents (or the equivalent minor unit for the base currency). Float / double representation is forbidden for monetary fields.
Why
Float arithmetic on money introduces silent errors and breaks the determinism guarantee in REQ-NFR-069. established project management guidelines + every accounting tradition requires exact decimal arithmetic.
How
Postgres BIGINT columns; ORM-level type wrapper exposing Decimal in application code; lint rule in CI flags float arithmetic on monetary variables; OpenAPI schema documents amounts as integer cents.
Done when
Schema review confirms all monetary columns are BIGINT; lint rule active; round-trip of 1234567 cents -> $12,345.67 in UI -> 1234567 cents preserves exactness.
Out of scope
Currencies with three-decimal minor units (deferred with multi-currency).
established project management guidelines Mapping
Precision NFR for monetary storage - foundational to established project management guidelines Cost Management.