You could handle this two ways, each of which will leave your account payable with an open balance:
1) Post a reversal of the cheque using your Journal Adjustments. Debit the bank account the cheque was drawn on (returning the monies never collected to the bank) and credit Accounts Payable putting the supplier/vendor name in the Names field; if the cheque for the purchase was expensed directly without a supplier bill, post the credit to the appropriate expense and taxes accounts;
2) Post a reversal of the cheque using the Deposits (NOT Receive Payments). The debit to the bank is automatically taken care of by using the Deposit function, but make sure you credit the Accounts Payable account, as well as putting in the supplier name in the Names field.
Either way, you are cancelling the cheque and reestablishing the amount payable to the vendor. IF the invoice for the uncashed cheque is no longer applicable (cancelled etc) then post a credit note cancelling the invoice (rather than voiding it).