JAJimmy A. Magbanuainlapistry.hashnode.dev·2d ago · 7 min readHow I built a billing system with a real double-entry ledger in Node + PostgreSQLMost billing code has the same bug hiding in it: it stores the account balance as a number and mutates it — balance += amount. It works fine, right up until a payment gets entered twice, or you have t00