If you need to make a correction to the amount, invoice, date, vendor, or other item in an electronic payment that was generated you must first void it.
This can be done by selecting Tasks > Void Payments in AP.
Go back into AP and make changes to the invoice or selected payment. Generate the file again—instead of regenerating it.
What if you entered the payment in question through manual payments? I recall having to void the whole thing, both the payment and the invoice, as I could not change the invoice for some reason.