Invoices can only be attached to active jobs so if you are trying to change an active invoiced job back to quote you’ll get this error message.
In order to return the job status to a quote to do things such as sending the customer an inventory request, or sending the quote to accept online you’ll need to first delete the invoice to change the job status back to quote.
Keep in mind invoices that have an audit log from online payments using one of our payments providers cannot be deleted.