I'm going to give you the steps
1. go to Vendor card then vendor ledger entries (or go to vendor ledger entries and filter for one vendor at a time)
2. position your cursor on the payment you want to apply
3. choose Process>>Apply Entries
4. For each invoice to be applied to the payment, position your cursor on the line
5. Choose Process>>Set Applies to ID
6. Once you've selected all the invoices for that payment, Choose Process>>Post Application
7. Repeat steps 1-6 for all payments for all vendors.