overpaid and unpaid invoices

overpaid and unpaid invoices

Unable to close two invoices and (apparently) have overpaid two invoices.  Please see the screen shot attached "magsdata screen 2".  

How do I apply the overpayment on the first two invoices to the last two open invoices?