Designing a Double-Entry Ledger for Utility Billing: Arrears, Partial Payments, and Rate Schedules
Most billing systems store a balance column and slowly corrupt it. Here is the double-entry model I used for a municipal water utility, and why arrears and partial payments force your hand.