Thank you. Your suggestion definitely worked.
But tell me this, why XYZ in summary wasn’t showing any data whilst it referred to invoice #2 when I attempted to delete it?
There could be many reasons. The absence of a balance in the Summary doesn’t mean there is nothing in the ledger for that account. It means the balance is zero. Or perhaps your display period was set for a time frame that did not include the transaction. Or perhaps there was data corruption. It is impossible to track the possibilities when you have done as many things to your records as you described and access to the actual data is not possible.