Original Invoice Number in Credit/Debit Note

Hello All,
if we have refund transaction, or edit some invoices, and i need to make a credit note, or debit note
Where should i put the original invoice in credit-debit note invoice XML?
and this credit/debit note should have new ICV?

Thanks in advance.

and this credit/debit note should have new ICV? … YES