You can add credit notes to invoices, then allocate them. In order to do this, search for the credit note you want to allocate. If you haven't added a credit note yet, click here to learn how to add a credit note.
Click 'Add new allocation' in the allocation history section.
On the page that appears, type in the details of your allocation. Click 'Add allocation' when you have filled in all the details.