# billing original Messy invoice finalization logic mixing pricing rules, time, logging, mutation, and file I/O.