Epicor 10

Hello,
I tried to apply the debit memo against the original invoice. it is a cancellation but I got the following message

This invoice was not cancelled by this Debit Memo

any ideas what I did wrong.

thanks,

Eddy