The system by default will not allow users to create credits to unconfirmed invoices. If you want to make an exception to this rule, activate the setting explained on this article.
Instructions
Ui steps
size
small
Ui step
Go to Setup>>Settings.
Ui step
Click on Credit Restrictions on Invoices under Order Entry.