Hi Mary.
There is a variety of different setups for the note to payee field, but if your single field consists of the contract account + invoice (for example: 98114-322318) then I suppose you will have to expand the default functionality with your own logic, to combine the two information.
Additionaly, if you use invoice number, it should be enough to determine the business partner from it, and then you will have everything you need to correctly connect the payment with the invoice, assuming the invoice number is unique and not issued per business partner.
Marko