How do I apply a check from a Vendor to remove credits on the account

I am trying to apply a check from a Vendor because we closed our account and will no longer be buying from them.  We had a credit on the account, so the vendor sent us a check.  How do I remove the credits on the account so I can make the Vendor inactive and to remove the credits from the Aged Payable Report?