This is caused by a problem with the invoice document or the way the transaction was raised. Check whether all invoices are affected or only some. If only some are affected, compare the process used for those that work with those that do not — for example, were some raised via a sales order invoice while others came from a sales ledger invoice?
