We could cancel a customer order debit invoice that is in Preliminary state. We could give the cancellation reason as a free text. Once the customer order is in Canceled state, you will not be able to edit the cancellation reason.
The invoice should be in Preliminary state.
The debit invoice will be canceled. If it is a customer order debit invoice, the status will change either to Delivered or Partially Delivered.
From the Customer Invoice window