ERP Inventory Module Design: Movements, Valuation, Guards

A practitioner's guide to ERP inventory module design: immutable stock movement ledgers, FIFO vs average cost valuation, and concurrency-safe negative stock guards in PostgreSQL.