The balance that shows at the top of a customers account information is a total of all the invoices that are due for that customer, and if it is a parent customer that has child customers underneath, all of the child location invoices as well.
To clear that balance, head to history > invoices and set the search filters to include the entire history for that customer, then filter by the status of "due". This should bring up most of the invoices included in that balance. If you didn't mean for those invoices to show up, you can go to payment details for those invoices and cancel them. This will remove the balance showing for the customer.
If those invoices are due and payment just hasn't been received/posted, you can post the payment normally.
Repeat the process for all invoices that have a status of past due, collections, or in collections.
You can even see the balances for the child accounts when looking at the invoice history for the parent account. You can show invoices for all locations or one location at a time.
If there is still a balance, then there is likely open invoices further back. You will just need to adjust the date range back further to capture other invoices that were outside your selected date range.
Naturally, don't delete an invoice if you want to collect that balance from the customer.