Calculate invoices, working on interfacing