correcting past errors

correcting past errors

Hello,

I discovered mistakes regarding VAT from previously matched invoices. I want to correct those mistakes but I get the following error messages:
" This transaction has been matched with a statement line. Hence, the fields which affect the transaction amount cannot be modified."

I also get one saying that this expense has already been invoiced therefore I cannot change it.

How can I go back in time and make necessary corrections?