Store invoices in database