This can be done from Advanced Setup → Billing Options.

From the Billing Options screen, select the checkbox Yes for Auto Post Patient Payments.

If the patient has an on-account amount, the system will automatically post the payment.