Because of ref. type and ref. name is there hence users are not allowed by ERPNext to cancel the JE and showing below message.
How can I cancel Journal Entry without reverting entry?