If you receive this error:
An invoice already exists with this invoice number in Xero and a payment or credit note has been allocated to it. This invoice can therefore not be edited. For more information, follow the link provided.
It means this invoice number has already been used.
To rectify this issue, please change the invoice number of the failed invoice