added support to query for invoices

Added support to be able to query for invoices (settlements are dependency).