Currently when the user select an invoice on a statement line that is already paid, the invoice field is unset directly. This can astonish the user because he may think its input was not taken.
Instead of this behavior, I propose to behave like when a line overpay an invoice. This means split the line one with zero amount and link to the invoice and the other with the amount and no link. This way the user will understand that his input was taken and there is nothing to pay.