Refunds in case of partially refunds

Regarding to guideline in case of refundings I need to create another invoice, but “Credit note”.
So my regular typecode is 388.
In case of refundings, I need to create another invoice with typecode 381 with same data as my original invoice.
What should I do, in case of partially refunds.
Let’s say I had Item1 and Item2 in my original invoice and after Item1 should be refunded.
I need to create credit note with Item1 and Item2, after what another Standard Invoice (388) whith only Item2 ?