If there is a message that a document is no longer available when trying to view it on a Sales Ledger account it means that Document Error Correction was used to make a change and the document was not reprinted.
In Document Error Correction, as the change is saved there is the option to print the invoice or Continue,
If Continue is selected the old invoice will be removed from the transaction, The Document Audit will show that this is what has happened, the AKREF will be replaced with a HEX number, this shows that the invoice was not re-printed.
To reattach a document to the transaction go back into Document Error Correction and make another change and reprint the invoice. This will attach the new document to the SL transaction and the audit will show the new document reference number.