cheque printing issue

hello ,

after i printed cheque i need to change the status of that cheque but ,the payment status menue button is disabled

looking for help

just check the code in the form in what condition it will get enabled.