Invoicing refactoring