You can easily delete the line item (Invoice, Debit or Credit Note) from a payment by clicking on the delete link to the right of the line item row on the view invoice form.
Once you click on the delete link the above page will load, asking if you are sure you want to delete this record. If you are sure click Delete Invoice button, if not click Cancel button and review again to determine if you want to delete the line item or not.
Click the "Delete Invoice" button if you are sure you want to delete this record or line item from the payment.
Click the cancel button if you are not sure you want to delete this record or line item from the payment.