You can cancel an open invoice with Cancel. You cannot edit one after it is made, so if the amount or details are wrong, cancel it and create a new one.
A paid invoice cannot be cancelled. If you need to give the money back, refund the payment instead.