Once a purchase credit note has been created this guide explains how to allocate this to any future bills.
Alternatively, you can create a credit note directly from a bill.
Navigate to Purchases > Bills.
Click on the Unpaid tab.
Click on the appropriate bill ID that you would like credited from the list.
Any credits notes you created above will appear at the bottom of the screen with the option to apply all, or a portion, of it against the invoice.
Click Apply to allocate the credit note against the invoice.