If any information on a transaction is locked and the fields greyed out you wont be able to make any changes to those fileds unless you unlock the transaction first.
Firstly, open the transaction in question and look for the "this transaction is locked" message on the bottom left. Click this message and you will be advised why this transactions is locked.
You may need to unallocate it, remove it from a bank rec or unlock a period. If its on a VAT return and you cant delete that return now then you may have to consider posting corrections such as credit notes or negative payments/receipts depending on the situation.