Work out an invoice total