add search function for contract invoice_ids