If the product to unstock has been sold, transferred or had quantity adjusted, the Unstock function will not be able to remove the item from inventory automatically. In this case, a credit note will still need to be authorised, but then a stock adjustment will need to be performed to correct your inventory levels.