Payments are applied to the oldest outstanding invoice.
To apply a payment to a specific invoice > go through the manual payments instead of through the process batch payments.
To view how payments have been applied:
Reports> accounting> billing> contact ledger to view the detail of the payer’s account.