RE: Clear Customer's balance.
I can give you a suggestion for stopping the unpaid issue. Create a payment method that has a general ledger account (I would set to the AR account in your case) and apply that payment method to all customers. When a sales invoice posts, your will credit sales, debit AR, credit AR and Debit AR--the last two entries coming from the payment method....it auto pays the invoices.
To clear the unpaids, you will need to go to each customer but not each invoice. In a Cash Receipts Journal, create a journal line for your customer, leave amount blank. Use the Process option and Apply Entries, which will give you the following screen:

Use the select more feature

highlight the radio button just to the right of the applies-to id field, this will select all invoices at one time.

When you press ok, the system will return the total of all the invoices to the journal line.
Repeat for all customers and choose your offsetting general ledger account to balance the journal and then post.