You don’t modify an order like that, that is in theory the reason for cancel.
Have never seen a POS system which does ‘order swapping’ like that.
I think the solution your looking for is the idea of VOID rather than cancel for new orders so that the VOID is recorded rather than cancel which is not recorded.
Sure I saw a similar topic not so long ago, will see if I can find it.
Hmm, sure I saw topic as described above but cant find it.
HOWEVER there is a simple setup for recording order cancels;