There's no automatic way. Enter two credit notes, one in AP and one in AR, which will reduce the balance outstanding for the vendor and the customer. Apply the credit notes against the invoices whose balances you want to reduce. Make sure to use the same GL account (it doesn't matter what account you use) for both transactions, and they will wash against each other.

Steve