There are spaces before (leading) or after (trailing spaces) the invoice ID.
This can occur when invoices are imported or sent from another software such as Sage Paperless Construction (SPC) or Timberscan.
If invoices are imported through AP Tools, Import Invoices, prior to importing, verify in the import file that there are no extra spaces before or after the invoice ID.