Difference between Delete and Cancel

SOLVED

Hi there,

it's seems that when I try to delete certain transactions such as purchase invoices, sometimes it 'deletes' the transaction and turns it red.  However sometimes it 'cancels' the transaction and raises a transaction to reverse it. 

I can't work out what the logic is for this.  Can anyone explain please?

Many thanks

Paul