how computer-generated invoices work