To resolve this issue:
Delete the Invoice related to the DO.
Go to Housekeeping, Run Setup, Administrative, Tools 2.
Tick the option Change ToInv No. and look for the DO number.
At the To Invoice column, delete the Invoice No. for that DO record.
Click OK.
Re-create the invoice and update from the related DO.
