We would suggest you to please delete the amount recorded against the purchase invoice and proceed with editing the invoice. After saving the invoice, please record the payment again.
To delete a payment, please go to the purchase invoice >> Click on Payment Mode >> Delete Payment.

